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

Unified Diff: src/api.cc

Issue 2840923002: Revert of [inspector] always include user scripts in the snapshot. (Closed)
Patch Set: 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 0d885e14a5914caf01e6bc34bc3799234f910196..d7c01afb2cd603f6992067cbf20ab950c35bc598 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -9287,11 +9287,6 @@
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 {
@@ -9348,13 +9343,12 @@
handle_scope.CloseAndEscape(i::Handle<i::String>::cast(value)));
}
-Maybe<int> debug::Script::ContextId() const {
+MaybeLocal<Value> debug::Script::ContextData() const {
i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
i::HandleScope handle_scope(isolate);
i::Handle<i::Script> script = Utils::OpenHandle(this);
- i::Object* value = script->context_data();
- if (value->IsSmi()) return Just(i::Smi::cast(value)->value());
- return Nothing<int>();
+ i::Handle<i::Object> value(script->context_data(), isolate);
+ return Utils::ToLocal(handle_scope.CloseAndEscape(value));
}
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