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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/DOMDataStore.h

Issue 2690943002: Revert of binding: Changes the association among global-proxy/global/window-instance. (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/core/v8/DOMDataStore.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/DOMDataStore.h b/third_party/WebKit/Source/bindings/core/v8/DOMDataStore.h
index 9969a1e40591c65e161437992a93e1d9ee5acd8a..7a062392da6560982d1c259fa5e59b07827bc327 100644
--- a/third_party/WebKit/Source/bindings/core/v8/DOMDataStore.h
+++ b/third_party/WebKit/Source/bindings/core/v8/DOMDataStore.h
@@ -156,12 +156,6 @@
m_wrapperMap->markWrapper(scriptWrappable);
}
- // Dissociates a wrapper, if any, from |scriptWrappable|.
- void unsetWrapperIfAny(ScriptWrappable* scriptWrappable) {
- DCHECK(!m_isMainWorld);
- m_wrapperMap->removeIfAny(scriptWrappable);
- }
-
bool setReturnValueFrom(v8::ReturnValue<v8::Value> returnValue,
ScriptWrappable* object) {
if (m_isMainWorld)
@@ -219,16 +213,18 @@
template <>
inline void DOMWrapperMap<ScriptWrappable>::PersistentValueMapTraits::Dispose(
v8::Isolate*,
- v8::Global<v8::Object>,
+ v8::Global<v8::Object> value,
ScriptWrappable*) {
- WrapperTypeInfo::wrapperDestroyed();
+ toWrapperTypeInfo(value)->wrapperDestroyed();
}
template <>
inline void
DOMWrapperMap<ScriptWrappable>::PersistentValueMapTraits::DisposeWeak(
- const v8::WeakCallbackInfo<WeakCallbackDataType>&) {
- WrapperTypeInfo::wrapperDestroyed();
+ const v8::WeakCallbackInfo<WeakCallbackDataType>& data) {
+ auto wrapperTypeInfo = reinterpret_cast<WrapperTypeInfo*>(
+ data.GetInternalField(v8DOMWrapperTypeIndex));
+ wrapperTypeInfo->wrapperDestroyed();
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/bindings/bindings.gni ('k') | third_party/WebKit/Source/bindings/core/v8/DOMWrapperMap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698