Index: third_party/WebKit/Source/bindings/core/v8/GeometryInterfaces.cpp |
diff --git a/third_party/WebKit/Source/bindings/core/v8/GeometryInterfaces.cpp b/third_party/WebKit/Source/bindings/core/v8/GeometryInterfaces.cpp |
new file mode 100644 |
index 0000000000000000000000000000000000000000..da2d445d9f21f15fe2b001094f45c536b6d15dc1 |
--- /dev/null |
+++ b/third_party/WebKit/Source/bindings/core/v8/GeometryInterfaces.cpp |
@@ -0,0 +1,42 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "bindings/core/v8/GeometryInterfaces.h" |
+ |
+#include "bindings/core/v8/V8ScriptRunner.h" |
+ |
+namespace blink { |
+ |
+ScriptValue GeometryInterfaces::createDOMPoint(double x, double y, double z, double w) |
+{ |
+ v8::Isolate* isolate = v8::Isolate::GetCurrent(); |
haraken
2016/02/25 11:21:10
v8::Isolate::GetCurrent() is deprecated.
You shou
|
+ v8::HandleScope scope(isolate); |
haraken
2016/02/25 11:21:10
This shouldn't be needed. If GeometryInterfaces::c
|
+ |
+ v8::Local<v8::Value> args[] = { |
+ v8::Number::New(isolate, x), |
+ v8::Number::New(isolate, y), |
+ v8::Number::New(isolate, z), |
+ v8::Number::New(isolate, w) |
+ }; |
+ ScriptState* scriptState = ScriptState::current(isolate); |
+ return ScriptValue(scriptState, V8ScriptRunner::callExtraOrCrash(scriptState, "createDOMPoint", args)); |
+} |
+ |
+void GeometryInterfaces::updateDOMPoint(ScriptValue& scriptValue, double x, double y, double z, double w) |
haraken
2016/02/25 11:21:10
scriptValue => eyeTranslation ?
|
+{ |
+ v8::Isolate* isolate = v8::Isolate::GetCurrent(); |
haraken
2016/02/25 11:21:10
Remove this.
|
+ v8::HandleScope scope(isolate); |
haraken
2016/02/25 11:21:10
Remove this.
|
+ |
+ v8::Local<v8::Value> args[] = { |
+ scriptValue.v8Value(), |
+ v8::Number::New(isolate, x), |
+ v8::Number::New(isolate, y), |
+ v8::Number::New(isolate, z), |
+ v8::Number::New(isolate, w) |
+ }; |
+ ScriptState* scriptState = ScriptState::current(isolate); |
haraken
2016/02/25 11:21:10
With this, you'll end up with using a wrong Script
|
+ V8ScriptRunner::callExtraOrCrash(scriptState, "updateDOMPoint", args); |
+} |
+ |
+} // namespace blink |