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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/GeometryInterfaces.cpp

Issue 1709003002: Geometry: Reimplement DOMPoint using V8 extras. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "bindings/core/v8/GeometryInterfaces.h"
6
7 #include "bindings/core/v8/V8ScriptRunner.h"
8
9 namespace blink {
10
11 ScriptValue GeometryInterfaces::createDOMPoint(double x, double y, double z, dou ble w)
12 {
13 v8::Isolate* isolate = v8::Isolate::GetCurrent();
haraken 2016/02/25 11:21:10 v8::Isolate::GetCurrent() is deprecated. You shou
14 v8::HandleScope scope(isolate);
haraken 2016/02/25 11:21:10 This shouldn't be needed. If GeometryInterfaces::c
15
16 v8::Local<v8::Value> args[] = {
17 v8::Number::New(isolate, x),
18 v8::Number::New(isolate, y),
19 v8::Number::New(isolate, z),
20 v8::Number::New(isolate, w)
21 };
22 ScriptState* scriptState = ScriptState::current(isolate);
23 return ScriptValue(scriptState, V8ScriptRunner::callExtraOrCrash(scriptState , "createDOMPoint", args));
24 }
25
26 void GeometryInterfaces::updateDOMPoint(ScriptValue& scriptValue, double x, doub le y, double z, double w)
haraken 2016/02/25 11:21:10 scriptValue => eyeTranslation ?
27 {
28 v8::Isolate* isolate = v8::Isolate::GetCurrent();
haraken 2016/02/25 11:21:10 Remove this.
29 v8::HandleScope scope(isolate);
haraken 2016/02/25 11:21:10 Remove this.
30
31 v8::Local<v8::Value> args[] = {
32 scriptValue.v8Value(),
33 v8::Number::New(isolate, x),
34 v8::Number::New(isolate, y),
35 v8::Number::New(isolate, z),
36 v8::Number::New(isolate, w)
37 };
38 ScriptState* scriptState = ScriptState::current(isolate);
haraken 2016/02/25 11:21:10 With this, you'll end up with using a wrong Script
39 V8ScriptRunner::callExtraOrCrash(scriptState, "updateDOMPoint", args);
40 }
41
42 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698