Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Unified Diff: src/api.cc

Issue 2836623002: [inspector] always include user scripts in the snapshot. (Closed)
Patch Set: rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/debug/debug-interface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index d7c01afb2cd603f6992067cbf20ab950c35bc598..0d885e14a5914caf01e6bc34bc3799234f910196 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -9287,6 +9287,11 @@ bool debug::Script::WasCompiled() const {
i::Script::COMPILATION_STATE_COMPILED;
}
+bool debug::Script::IsEmbedded() const {
+ i::Handle<i::Script> script = Utils::OpenHandle(this);
+ return script->context_data() == script->GetHeap()->uninitialized_symbol();
+}
+
int debug::Script::Id() const { return Utils::OpenHandle(this)->id(); }
int debug::Script::LineOffset() const {
@@ -9343,12 +9348,13 @@ MaybeLocal<String> debug::Script::SourceMappingURL() const {
handle_scope.CloseAndEscape(i::Handle<i::String>::cast(value)));
}
-MaybeLocal<Value> debug::Script::ContextData() const {
+Maybe<int> debug::Script::ContextId() const {
i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
i::HandleScope handle_scope(isolate);
i::Handle<i::Script> script = Utils::OpenHandle(this);
- i::Handle<i::Object> value(script->context_data(), isolate);
- return Utils::ToLocal(handle_scope.CloseAndEscape(value));
+ i::Object* value = script->context_data();
+ if (value->IsSmi()) return Just(i::Smi::cast(value)->value());
+ return Nothing<int>();
}
MaybeLocal<String> debug::Script::Source() const {
« no previous file with comments | « no previous file | src/debug/debug-interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698