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

Unified Diff: Source/bindings/core/v8/V8ScriptRunner.cpp

Issue 465283002: Blink-in-JS: Make error messages thrown in private scripts more verbose (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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
Index: Source/bindings/core/v8/V8ScriptRunner.cpp
diff --git a/Source/bindings/core/v8/V8ScriptRunner.cpp b/Source/bindings/core/v8/V8ScriptRunner.cpp
index 5c0f1d1765b34b9aff1fb147ec5be179092db8ea..b187a3b7b995030842c064ffc17465ba0c7186df 100644
--- a/Source/bindings/core/v8/V8ScriptRunner.cpp
+++ b/Source/bindings/core/v8/V8ScriptRunner.cpp
@@ -183,12 +183,22 @@ v8::Local<v8::Value> V8ScriptRunner::runCompiledScript(v8::Handle<v8::Script> sc
v8::Local<v8::Value> V8ScriptRunner::compileAndRunInternalScript(v8::Handle<v8::String> source, v8::Isolate* isolate, const String& fileName, const TextPosition& scriptStartPosition)
{
- TRACE_EVENT0("v8", "v8.run");
- TRACE_EVENT_SCOPED_SAMPLING_STATE("v8", "V8Execution");
v8::Handle<v8::Script> script = V8ScriptRunner::compileScript(source, fileName, scriptStartPosition, 0, isolate);
if (script.IsEmpty())
return v8::Local<v8::Value>();
+ TRACE_EVENT0("v8", "v8.run");
+ TRACE_EVENT_SCOPED_SAMPLING_STATE("v8", "V8Execution");
+ V8RecursionScope::MicrotaskSuppression recursionScope(isolate);
+ v8::Local<v8::Value> result = script->Run();
+ crashIfV8IsDead();
+ return result;
+}
+
+v8::Local<v8::Value> V8ScriptRunner::runCompiledInternalScript(v8::Handle<v8::Script> script, v8::Isolate* isolate)
+{
+ TRACE_EVENT0("v8", "v8.run");
+ TRACE_EVENT_SCOPED_SAMPLING_STATE("v8", "V8Execution");
V8RecursionScope::MicrotaskSuppression recursionScope(isolate);
v8::Local<v8::Value> result = script->Run();
crashIfV8IsDead();
« Source/bindings/core/v8/PrivateScriptRunner.cpp ('K') | « Source/bindings/core/v8/V8ScriptRunner.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698