| Index: Source/bindings/v8/DOMDataStore.h
|
| diff --git a/Source/bindings/v8/DOMDataStore.h b/Source/bindings/v8/DOMDataStore.h
|
| index 8e2f60becdde8411194a7d88166ee83da30e0f02..c45034c633bd67250b3f1403fd139043df15d68c 100644
|
| --- a/Source/bindings/v8/DOMDataStore.h
|
| +++ b/Source/bindings/v8/DOMDataStore.h
|
| @@ -46,7 +46,7 @@ class Node;
|
| class DOMDataStore {
|
| WTF_MAKE_NONCOPYABLE(DOMDataStore);
|
| public:
|
| - explicit DOMDataStore(WrapperWorldType);
|
| + explicit DOMDataStore(bool isMainWorld);
|
| ~DOMDataStore();
|
|
|
| static DOMDataStore& current(v8::Isolate*);
|
| @@ -139,7 +139,7 @@ public:
|
| template<typename V8T, typename T>
|
| inline v8::Handle<v8::Object> get(T* object, v8::Isolate* isolate)
|
| {
|
| - if (ScriptWrappable::wrapperCanBeStoredInObject(object) && m_type == MainWorld)
|
| + if (ScriptWrappable::wrapperCanBeStoredInObject(object) && m_isMainWorld)
|
| return ScriptWrappable::getUnsafeWrapperFromObject(object).newLocal(isolate);
|
| return m_wrapperMap.newLocal(V8T::toInternalPointer(object), isolate);
|
| }
|
| @@ -147,7 +147,7 @@ public:
|
| template<typename V8T, typename T>
|
| inline void setReference(const v8::Persistent<v8::Object>& parent, T* child, v8::Isolate* isolate)
|
| {
|
| - if (ScriptWrappable::wrapperCanBeStoredInObject(child) && m_type == MainWorld) {
|
| + if (ScriptWrappable::wrapperCanBeStoredInObject(child) && m_isMainWorld) {
|
| ScriptWrappable::getUnsafeWrapperFromObject(child).setReferenceFrom(parent, isolate);
|
| return;
|
| }
|
| @@ -157,7 +157,7 @@ public:
|
| template<typename V8T, typename T>
|
| inline bool setReturnValueFrom(v8::ReturnValue<v8::Value> returnValue, T* object)
|
| {
|
| - if (ScriptWrappable::wrapperCanBeStoredInObject(object) && m_type == MainWorld)
|
| + if (ScriptWrappable::wrapperCanBeStoredInObject(object) && m_isMainWorld)
|
| return ScriptWrappable::setReturnValue(returnValue, object);
|
| return m_wrapperMap.setReturnValueFrom(returnValue, V8T::toInternalPointer(object));
|
| }
|
| @@ -165,7 +165,7 @@ public:
|
| template<typename V8T, typename T>
|
| inline bool containsWrapper(T* object)
|
| {
|
| - if (ScriptWrappable::wrapperCanBeStoredInObject(object) && m_type == MainWorld)
|
| + if (ScriptWrappable::wrapperCanBeStoredInObject(object) && m_isMainWorld)
|
| return !ScriptWrappable::getUnsafeWrapperFromObject(object).isEmpty();
|
| return m_wrapperMap.containsKey(V8T::toInternalPointer(object));
|
| }
|
| @@ -176,7 +176,7 @@ private:
|
| {
|
| ASSERT(!!object);
|
| ASSERT(!wrapper.IsEmpty());
|
| - if (ScriptWrappable::wrapperCanBeStoredInObject(object) && m_type == MainWorld) {
|
| + if (ScriptWrappable::wrapperCanBeStoredInObject(object) && m_isMainWorld) {
|
| ScriptWrappable::setWrapperInObject(object, wrapper, isolate, configuration);
|
| return;
|
| }
|
| @@ -195,11 +195,11 @@ private:
|
| {
|
| // Verify our assumptions about the main world.
|
| UnsafePersistent<v8::Object> unsafePersistent = wrappable->unsafePersistent();
|
| - ASSERT(unsafePersistent.isEmpty() || !(holder == *unsafePersistent.persistent()) || current(v8::Isolate::GetCurrent()).m_type == MainWorld);
|
| + ASSERT(unsafePersistent.isEmpty() || !(holder == *unsafePersistent.persistent()) || current(v8::Isolate::GetCurrent()).m_isMainWorld);
|
| return holder == *unsafePersistent.persistent();
|
| }
|
|
|
| - WrapperWorldType m_type;
|
| + bool m_isMainWorld;
|
| DOMWrapperMap<void> m_wrapperMap;
|
| };
|
|
|
|
|