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

Unified Diff: src/inspector/v8-debugger.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 | « src/inspector/debugger_script_externs.js ('k') | src/inspector/v8-inspector-impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/inspector/v8-debugger.cc
diff --git a/src/inspector/v8-debugger.cc b/src/inspector/v8-debugger.cc
index dbaed23448207a33af4ad6a09452533e2bd311a9..1509993a8261dc4a2fb6610ebc8a936e5a73805f 100644
--- a/src/inspector/v8-debugger.cc
+++ b/src/inspector/v8-debugger.cc
@@ -588,23 +588,15 @@ void V8Debugger::handleV8DebugEvent(
v8::Local<v8::Value> scriptWrapper =
callInternalGetterFunction(scriptMirror.As<v8::Object>(), "value");
DCHECK(scriptWrapper->IsObject());
- v8::Local<v8::DebugInterface::Script> script =
- v8::DebugInterface::Script::Wrap(m_isolate,
- scriptWrapper.As<v8::Object>())
- .ToLocalChecked();
+ v8::Local<v8::DebugInterface::Script> script;
+ if (!v8::DebugInterface::Script::Wrap(m_isolate,
+ scriptWrapper.As<v8::Object>())
+ .ToLocal(&script)) {
+ return;
+ }
if (script->IsWasm()) {
m_wasmTranslation.AddScript(scriptWrapper.As<v8::Object>());
} else if (m_ignoreScriptParsedEventsCounter == 0) {
- v8::Local<v8::Value> argv[] = {eventDetails.GetEventData()};
- v8::Local<v8::Value> value =
- callDebuggerMethod("getAfterCompileScript", 1, argv).ToLocalChecked();
- if (value->IsNull()) return;
- DCHECK(value->IsObject());
- v8::Local<v8::Object> scriptObject = v8::Local<v8::Object>::Cast(value);
- v8::Local<v8::DebugInterface::Script> script;
- if (!v8::DebugInterface::Script::Wrap(m_isolate, scriptObject)
- .ToLocal(&script))
- return;
agent->didParseSource(
wrapUnique(new V8DebuggerScript(m_isolate, script, inLiveEditScope)),
event == v8::AfterCompile);
« no previous file with comments | « src/inspector/debugger_script_externs.js ('k') | src/inspector/v8-inspector-impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698