Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / bindings / v8 / ScriptCallStackFactory.cpp
index b6c66d3..f1f9ded 100644 (file)
@@ -31,7 +31,6 @@
 #include "config.h"
 #include "bindings/v8/ScriptCallStackFactory.h"
 
-#include "bindings/v8/ScriptScope.h"
 #include "bindings/v8/ScriptValue.h"
 #include "bindings/v8/V8Binding.h"
 #include "core/inspector/InspectorInstrumentation.h"
@@ -124,14 +123,13 @@ PassRefPtr<ScriptArguments> createScriptArguments(const v8::FunctionCallbackInfo
 {
     v8::Isolate* isolate = v8arguments.GetIsolate();
     v8::HandleScope scope(isolate);
-    v8::Local<v8::Context> context = isolate->GetCurrentContext();
-    ScriptState* state = ScriptState::forContext(context);
+    ScriptState* scriptState = ScriptState::current(isolate);
 
     Vector<ScriptValue> arguments;
     for (int i = skipArgumentCount; i < v8arguments.Length(); ++i)
-        arguments.append(ScriptValue(v8arguments[i], isolate));
+        arguments.append(ScriptValue(scriptState, v8arguments[i]));
 
-    return ScriptArguments::create(state, arguments);
+    return ScriptArguments::create(scriptState, arguments);
 }
 
 } // namespace WebCore