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

Unified Diff: src/accessors.cc

Issue 2499273003: [inspector] introduced Script::TYPE_INSPECTOR (Closed)
Patch Set: rebased Created 4 years, 1 month 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/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/accessors.cc
diff --git a/src/accessors.cc b/src/accessors.cc
index 9ec24b84c7c586bd8c8c654d226af6c141e579d6..7f45f404c45dbcc680636d49453559b8639cf077 100644
--- a/src/accessors.cc
+++ b/src/accessors.cc
@@ -527,11 +527,10 @@ void Accessors::ScriptIsEmbedderDebugScriptGetter(
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate());
DisallowHeapAllocation no_allocation;
HandleScope scope(isolate);
- Object* object = *Utils::OpenHandle(*info.Holder());
- bool is_embedder_debug_script = Script::cast(JSValue::cast(object)->value())
- ->origin_options()
- .IsEmbedderDebugScript();
- Object* res = *isolate->factory()->ToBoolean(is_embedder_debug_script);
+ Object* script_obj = *Utils::OpenHandle(*info.Holder());
+ Script* script = Script::cast(script_obj);
+ Script::Type type = static_cast<Script::Type>(script->type());
+ Object* res = *isolate->factory()->ToBoolean(type == Script::TYPE_INSPECTOR);
info.GetReturnValue().Set(Utils::ToLocal(Handle<Object>(res, isolate)));
}
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698