OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "config.h" | 5 #include "config.h" |
6 #include "core/animation/AnimationTestHelper.h" | 6 #include "core/animation/AnimationTestHelper.h" |
7 | 7 |
8 #include "bindings/core/v8/V8Binding.h" | 8 #include "bindings/core/v8/V8Binding.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
11 | 11 |
12 v8::Handle<v8::Value> stringToV8Value(String string) | 12 v8::Local<v8::Value> stringToV8Value(String string) |
13 { | 13 { |
14 return v8::Handle<v8::Value>::Cast(v8String(v8::Isolate::GetCurrent(), strin
g)); | 14 return v8::Local<v8::Value>::Cast(v8String(v8::Isolate::GetCurrent(), string
)); |
15 } | 15 } |
16 | 16 |
17 v8::Handle<v8::Value> doubleToV8Value(double number) | 17 v8::Local<v8::Value> doubleToV8Value(double number) |
18 { | 18 { |
19 return v8::Handle<v8::Value>::Cast(v8::Number::New(v8::Isolate::GetCurrent()
, number)); | 19 return v8::Local<v8::Value>::Cast(v8::Number::New(v8::Isolate::GetCurrent(),
number)); |
20 } | 20 } |
21 | 21 |
22 void setV8ObjectPropertyAsString(v8::Handle<v8::Object> object, String name, Str
ing value) | 22 void setV8ObjectPropertyAsString(v8::Local<v8::Object> object, String name, Stri
ng value) |
23 { | 23 { |
24 object->Set(stringToV8Value(name), stringToV8Value(value)); | 24 object->Set(stringToV8Value(name), stringToV8Value(value)); |
25 } | 25 } |
26 | 26 |
27 void setV8ObjectPropertyAsNumber(v8::Handle<v8::Object> object, String name, dou
ble value) | 27 void setV8ObjectPropertyAsNumber(v8::Local<v8::Object> object, String name, doub
le value) |
28 { | 28 { |
29 object->Set(stringToV8Value(name), doubleToV8Value(value)); | 29 object->Set(stringToV8Value(name), doubleToV8Value(value)); |
30 } | 30 } |
31 | 31 |
32 } // namespace blink | 32 } // namespace blink |
OLD | NEW |