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

Unified Diff: Source/bindings/v8/ScriptController.cpp

Issue 15975002: Implement V8ScriptRunner::callFunction() Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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 | Source/bindings/v8/V8ScriptRunner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/ScriptController.cpp
diff --git a/Source/bindings/v8/ScriptController.cpp b/Source/bindings/v8/ScriptController.cpp
index cb5e9e9e5ff72f7573612e14209af55864872fa3..edbba75932c0895f8be90bea80230bd1345654a8 100644
--- a/Source/bindings/v8/ScriptController.cpp
+++ b/Source/bindings/v8/ScriptController.cpp
@@ -184,7 +184,7 @@ ScriptValue ScriptController::callFunctionEvenIfScriptDisabled(v8::Handle<v8::Fu
return ScriptValue(callFunction(function, receiver, argc, argv));
}
-static inline void resourceInfo(const v8::Handle<v8::Function> function, String& resourceName, int& lineNumber)
+static void resourceInfo(const v8::Handle<v8::Function> function, String& resourceName, int& lineNumber)
{
v8::ScriptOrigin origin = function->GetScriptOrigin();
if (origin.ResourceName().IsEmpty()) {
@@ -196,7 +196,7 @@ static inline void resourceInfo(const v8::Handle<v8::Function> function, String&
}
}
-static inline String resourceString(const v8::Handle<v8::Function> function)
+static String resourceString(const v8::Handle<v8::Function> function)
{
String resourceName;
int lineNumber;
@@ -211,11 +211,6 @@ static inline String resourceString(const v8::Handle<v8::Function> function)
v8::Local<v8::Value> ScriptController::callFunctionWithInstrumentation(ScriptExecutionContext* context, v8::Handle<v8::Function> function, v8::Handle<v8::Object> receiver, int argc, v8::Handle<v8::Value> args[])
{
- V8GCController::checkMemoryUsage();
-
- if (V8RecursionScope::recursionLevel() >= kMaxRecursionDepth)
- return handleMaxRecursionDepthExceeded();
-
InspectorInstrumentationCookie cookie;
if (InspectorInstrumentation::timelineAgentEnabled(context)) {
String resourceName;
@@ -224,15 +219,9 @@ v8::Local<v8::Value> ScriptController::callFunctionWithInstrumentation(ScriptExe
cookie = InspectorInstrumentation::willCallFunction(context, resourceName, lineNumber);
}
- v8::Local<v8::Value> result;
- {
- TRACE_EVENT1("v8", "v8.callFunction", "callsite", resourceString(function).utf8());
- V8RecursionScope recursionScope(context);
- result = function->Call(receiver, argc, args);
- }
+ v8::Local<v8::Value> result = V8ScriptRunner::callFunction(function, context, receiver, argc, args);
InspectorInstrumentation::didCallFunction(cookie);
- crashIfV8IsDead();
return result;
}
@@ -541,7 +530,6 @@ NPObject* ScriptController::createScriptObjectForPluginElement(HTMLPlugInElement
return npCreateV8ScriptObject(0, v8::Handle<v8::Object>::Cast(v8plugin), window);
}
-
void ScriptController::clearWindowShell()
{
double start = currentTime();
« no previous file with comments | « no previous file | Source/bindings/v8/V8ScriptRunner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698