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

Unified Diff: Source/bindings/core/v8/DOMWrapperMap.h

Issue 368853002: Add ScriptForbiddenScope to weak callbacks of DOM wrappers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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
« no previous file with comments | « no previous file | Source/bindings/core/v8/ScriptWrappable.h » ('j') | Source/core/dom/ScriptForbiddenScope.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/DOMWrapperMap.h
diff --git a/Source/bindings/core/v8/DOMWrapperMap.h b/Source/bindings/core/v8/DOMWrapperMap.h
index 55dd1d9cfd0fd56dc40832b6111bb42a6ba99ca8..c13f8fdf9536ed83e9dab4395f842e0cec2181ff 100644
--- a/Source/bindings/core/v8/DOMWrapperMap.h
+++ b/Source/bindings/core/v8/DOMWrapperMap.h
@@ -32,6 +32,7 @@
#define DOMWrapperMap_h
#include "bindings/core/v8/WrapperTypeInfo.h"
+#include "core/dom/ScriptForbiddenScope.h"
#include "wtf/HashMap.h"
#include <v8-util.h>
#include <v8.h>
@@ -160,6 +161,7 @@ inline void DOMWrapperMap<void>::PersistentValueMapTraits::Dispose(
v8::UniquePersistent<v8::Object> value,
void* key)
{
+ ScriptForbiddenScope forbiddenScope;
RELEASE_ASSERT(!value.IsEmpty()); // See crbug.com/368095.
releaseObject(v8::Local<v8::Object>::New(isolate, value));
}
« no previous file with comments | « no previous file | Source/bindings/core/v8/ScriptWrappable.h » ('j') | Source/core/dom/ScriptForbiddenScope.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698