Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / bindings / v8 / custom / V8InjectedScriptHostCustom.cpp
index 142c6c6..b19d116 100644 (file)
@@ -80,7 +80,7 @@ ScriptValue InjectedScriptHost::nodeAsScriptValue(ScriptState* state, Node* node
     v8::Context::Scope contextScope(context);
 
     ExceptionState exceptionState(v8::Handle<v8::Object>(), isolate);
-    if (!BindingSecurity::shouldAllowAccessToNode(node, exceptionState))
+    if (!BindingSecurity::shouldAllowAccessToNode(isolate, node, exceptionState))
         return ScriptValue(v8::Null(isolate), isolate);
     return ScriptValue(toV8(node, v8::Handle<v8::Object>(), isolate), isolate);
 }
@@ -287,7 +287,7 @@ void V8InjectedScriptHost::getEventListenersMethodCustom(const v8::FunctionCallb
 
     // We need to handle a DOMWindow specially, because a DOMWindow wrapper exists on a prototype chain.
     if (!target)
-        target = toNativeDOMWindow(value, info.GetIsolate());
+        target = toDOMWindow(value, info.GetIsolate());
 
     if (!target || !target->executionContext())
         return;
@@ -319,31 +319,6 @@ void V8InjectedScriptHost::inspectMethodCustom(const v8::FunctionCallbackInfo<v8
     host->inspectImpl(object.toJSONValue(ScriptState::current()), hints.toJSONValue(ScriptState::current()));
 }
 
-void V8InjectedScriptHost::databaseIdMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
-    if (info.Length() > 0 && V8Database::hasInstance(info[0], info.GetIsolate())) {
-        Database* database = V8Database::toNative(v8::Handle<v8::Object>::Cast(info[0]));
-        if (database) {
-            InjectedScriptHost* host = V8InjectedScriptHost::toNative(info.Holder()); {
-                v8SetReturnValueStringOrUndefined(info, host->databaseIdImpl(database), info.GetIsolate());
-                return;
-            }
-        }
-    }
-}
-
-void V8InjectedScriptHost::storageIdMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
-    if (info.Length() > 0 && V8Storage::hasInstance(info[0], info.GetIsolate())) {
-        Storage* storage = V8Storage::toNative(v8::Handle<v8::Object>::Cast(info[0]));
-        if (storage) {
-            InjectedScriptHost* host = V8InjectedScriptHost::toNative(info.Holder());
-            v8SetReturnValueStringOrUndefined(info, host->storageIdImpl(storage), info.GetIsolate());
-            return;
-        }
-    }
-}
-
 void V8InjectedScriptHost::evaluateMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
 {
     v8::Isolate* isolate = info.GetIsolate();