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

Side by Side Diff: Source/bindings/core/v8/V8HiddenValue.cpp

Issue 1071963002: Replace Handle<> with Local<> in bindings/core/v8 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 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
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 "bindings/core/v8/V8HiddenValue.h" 6 #include "bindings/core/v8/V8HiddenValue.h"
7 7
8 #include "bindings/core/v8/ScriptWrappable.h" 8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "bindings/core/v8/V8Binding.h" 9 #include "bindings/core/v8/V8Binding.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 #define V8_DEFINE_METHOD(name) \ 13 #define V8_DEFINE_METHOD(name) \
14 v8::Handle<v8::String> V8HiddenValue::name(v8::Isolate* isolate) \ 14 v8::Local<v8::String> V8HiddenValue::name(v8::Isolate* isolate) \
15 { \ 15 { \
16 V8HiddenValue* hiddenValue = V8PerIsolateData::from(isolate)->hiddenValue(); \ 16 V8HiddenValue* hiddenValue = V8PerIsolateData::from(isolate)->hiddenValue(); \
17 if (hiddenValue->m_##name.isEmpty()) { \ 17 if (hiddenValue->m_##name.isEmpty()) { \
18 hiddenValue->m_##name.set(isolate, v8AtomicString(isolate, #name)); \ 18 hiddenValue->m_##name.set(isolate, v8AtomicString(isolate, #name)); \
19 } \ 19 } \
20 return hiddenValue->m_##name.newLocal(isolate); \ 20 return hiddenValue->m_##name.newLocal(isolate); \
21 } 21 }
22 22
23 V8_HIDDEN_VALUES(V8_DEFINE_METHOD); 23 V8_HIDDEN_VALUES(V8_DEFINE_METHOD);
24 24
25 v8::Local<v8::Value> V8HiddenValue::getHiddenValue(v8::Isolate* isolate, v8::Han dle<v8::Object> object, v8::Handle<v8::String> key) 25 v8::Local<v8::Value> V8HiddenValue::getHiddenValue(v8::Isolate* isolate, v8::Loc al<v8::Object> object, v8::Local<v8::String> key)
26 { 26 {
27 return object->GetHiddenValue(key); 27 return object->GetHiddenValue(key);
28 } 28 }
29 29
30 bool V8HiddenValue::setHiddenValue(v8::Isolate* isolate, v8::Handle<v8::Object> object, v8::Handle<v8::String> key, v8::Handle<v8::Value> value) 30 bool V8HiddenValue::setHiddenValue(v8::Isolate* isolate, v8::Local<v8::Object> o bject, v8::Local<v8::String> key, v8::Local<v8::Value> value)
31 { 31 {
32 return object->SetHiddenValue(key, value); 32 return object->SetHiddenValue(key, value);
33 } 33 }
34 34
35 bool V8HiddenValue::deleteHiddenValue(v8::Isolate* isolate, v8::Handle<v8::Objec t> object, v8::Handle<v8::String> key) 35 bool V8HiddenValue::deleteHiddenValue(v8::Isolate* isolate, v8::Local<v8::Object > object, v8::Local<v8::String> key)
36 { 36 {
37 return object->DeleteHiddenValue(key); 37 return object->DeleteHiddenValue(key);
38 } 38 }
39 39
40 v8::Local<v8::Value> V8HiddenValue::getHiddenValueFromMainWorldWrapper(v8::Isola te* isolate, ScriptWrappable* wrappable, v8::Handle<v8::String> key) 40 v8::Local<v8::Value> V8HiddenValue::getHiddenValueFromMainWorldWrapper(v8::Isola te* isolate, ScriptWrappable* wrappable, v8::Local<v8::String> key)
41 { 41 {
42 v8::Local<v8::Object> wrapper = wrappable->newLocalWrapper(isolate); 42 v8::Local<v8::Object> wrapper = wrappable->newLocalWrapper(isolate);
43 return wrapper.IsEmpty() ? v8::Local<v8::Value>() : getHiddenValue(isolate, wrapper, key); 43 return wrapper.IsEmpty() ? v8::Local<v8::Value>() : getHiddenValue(isolate, wrapper, key);
44 } 44 }
45 45
46 } // namespace blink 46 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/V8HiddenValue.h ('k') | Source/bindings/core/v8/V8IteratorResultValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698