/snap/node/11691/include/node
NameSizeModeActions
cppgc/-0755rm
libplatform/-0755rm
openssl/-0755rm
uv/-0755rm
common.gypi269730644editdlrm
config.gypi186570644editdlrm
js_native_api.h317700644editdlrm
js_native_api_types.h76030644editdlrm
node.h695950644editdlrm
node_api.h103700644editdlrm
node_api_types.h18250644editdlrm
node_buffer.h36840644editdlrm
node_object_wrap.h38670644editdlrm
node_version.h42430644editdlrm
uv.h728100644editdlrm
v8-array-buffer.h183160644editdlrm
v8-callbacks.h169930644editdlrm
v8-container.h59590644editdlrm
v8-context.h181840644editdlrm
v8-cppgc.h76410644editdlrm
v8-data.h16230644editdlrm
v8-date.h12180644editdlrm
v8-debug.h51610644editdlrm
v8-embedder-heap.h27750644editdlrm
v8-embedder-state-scope.h14930644editdlrm
v8-exception.h75890644editdlrm
v8-extension.h18700644editdlrm
v8-external.h9240644editdlrm
v8-forward.h16880644editdlrm
v8-function-callback.h196480644editdlrm
v8-function.h45300644editdlrm
v8-handle-base.h44040644editdlrm
v8-initialization.h104780644editdlrm
v8-internal.h585940644editdlrm
v8-isolate.h649060644editdlrm
v8-json.h13560644editdlrm
v8-local-handle.h241620644editdlrm
v8-locker.h39560644editdlrm
v8-maybe.h45740644editdlrm
v8-memory-span.h64210644editdlrm
v8-message.h74180644editdlrm
v8-microtask-queue.h50690644editdlrm
v8-microtask.h8610644editdlrm
v8-object.h302610644editdlrm
v8-persistent-handle.h182390644editdlrm
v8-platform.h490520644editdlrm
v8-primitive-object.h25910644editdlrm
v8-primitive.h283580644editdlrm
v8-profiler.h421010644editdlrm
v8-promise.h52940644editdlrm
v8-proxy.h12550644editdlrm
v8-regexp.h31710644editdlrm
v8-script.h313270644editdlrm
v8-snapshot.h103890644editdlrm
v8-source-location.h25970644editdlrm
v8-statistics.h76270644editdlrm
v8-template.h515690644editdlrm
v8-traced-handle.h127000644editdlrm
v8-typed-array.h115710644editdlrm
v8-unwinder.h47510644editdlrm
v8-value-serializer.h108150644editdlrm
v8-value.h171070644editdlrm
v8-version.h7730644editdlrm
v8-wasm.h61480644editdlrm
v8-weak-callback-info.h24710644editdlrm
v8.h37750644editdlrm
v8config.h336410644editdlrm
zconf.h169950644editdlrm
zlib.h974540644editdlrm
Edit: /snap/node/11691/include/node/v8-debug.h (5161B)
// Copyright 2021 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef INCLUDE_V8_DEBUG_H_ #define INCLUDE_V8_DEBUG_H_ #include #include "v8-script.h" // NOLINT(build/include_directory) #include "v8config.h" // NOLINT(build/include_directory) namespace v8 { class Isolate; class String; /** * A single JavaScript stack frame. */ class V8_EXPORT StackFrame { public: /** * Returns the source location, 0-based, for the associated function call. */ Location GetLocation() const; /** * Returns the number, 1-based, of the line for the associate function call. * This method will return Message::kNoLineNumberInfo if it is unable to * retrieve the line number, or if kLineNumber was not passed as an option * when capturing the StackTrace. */ int GetLineNumber() const { return GetLocation().GetLineNumber() + 1; } /** * Returns the 1-based column offset on the line for the associated function * call. * This method will return Message::kNoColumnInfo if it is unable to retrieve * the column number, or if kColumnOffset was not passed as an option when * capturing the StackTrace. */ int GetColumn() const { return GetLocation().GetColumnNumber() + 1; } /** * Returns the id of the script for the function for this StackFrame. * This method will return Message::kNoScriptIdInfo if it is unable to * retrieve the script id, or if kScriptId was not passed as an option when * capturing the StackTrace. */ int GetScriptId() const; /** * Returns the name of the resource that contains the script for the * function for this StackFrame. */ Local GetScriptName() const; /** * Returns the name of the resource that contains the script for the * function for this StackFrame or sourceURL value if the script name * is undefined and its source ends with //# sourceURL=... string or * deprecated //@ sourceURL=... string. */ Local GetScriptNameOrSourceURL() const; /** * Returns the source of the script for the function for this StackFrame. */ Local GetScriptSource() const; /** * Returns the source mapping URL (if one is present) of the script for * the function for this StackFrame. */ Local GetScriptSourceMappingURL() const; /** * Returns the name of the function associated with this stack frame. */ Local GetFunctionName() const; /** * Returns whether or not the associated function is compiled via a call to * eval(). */ bool IsEval() const; /** * Returns whether or not the associated function is called as a * constructor via "new". */ bool IsConstructor() const; /** * Returns whether or not the associated functions is defined in wasm. */ bool IsWasm() const; /** * Returns whether or not the associated function is defined by the user. */ bool IsUserJavaScript() const; }; /** * Representation of a JavaScript stack trace. The information collected is a * snapshot of the execution stack and the information remains valid after * execution continues. */ class V8_EXPORT StackTrace { public: /** * Flags that determine what information is placed captured for each * StackFrame when grabbing the current stack trace. * Note: these options are deprecated and we always collect all available * information (kDetailed). */ enum StackTraceOptions { kLineNumber = 1, kColumnOffset = 1 << 1 | kLineNumber, kScriptName = 1 << 2, kFunctionName = 1 << 3, kIsEval = 1 << 4, kIsConstructor = 1 << 5, kScriptNameOrSourceURL = 1 << 6, kScriptId = 1 << 7, kExposeFramesAcrossSecurityOrigins = 1 << 8, kOverview = kLineNumber | kColumnOffset | kScriptName | kFunctionName, kDetailed = kOverview | kIsEval | kIsConstructor | kScriptNameOrSourceURL }; /** * Returns a StackFrame at a particular index. */ Local GetFrame(Isolate* isolate, uint32_t index) const; /** * Returns the number of StackFrames. */ int GetFrameCount() const; /** * Grab a snapshot of the current JavaScript execution stack. * * \param frame_limit The maximum number of stack frames we want to capture. * \param options Enumerates the set of things we will capture for each * StackFrame. */ static Local CurrentStackTrace( Isolate* isolate, int frame_limit, StackTraceOptions options = kDetailed); /** * Returns the first valid script name or source URL starting at the top of * the JS stack. The returned string is either an empty handle if no script * name/url was found or a non-zero-length string. * * This method is equivalent to calling StackTrace::CurrentStackTrace and * walking the resulting frames from the beginning until a non-empty script * name/url is found. The difference is that this method won't allocate * a stack trace. */ static Local CurrentScriptNameOrSourceURL(Isolate* isolate); }; } // namespace v8 #endif // INCLUDE_V8_DEBUG_H_