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

Unified Diff: Source/bindings/core/v8/ScriptWrappable.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
Index: Source/bindings/core/v8/ScriptWrappable.h
diff --git a/Source/bindings/core/v8/ScriptWrappable.h b/Source/bindings/core/v8/ScriptWrappable.h
index 8cf3af2749f01f616736eca01353e42c104a8d27..c6398e254a0d4dc8bf0c8e70ed2770c663686ac8 100644
--- a/Source/bindings/core/v8/ScriptWrappable.h
+++ b/Source/bindings/core/v8/ScriptWrappable.h
@@ -32,6 +32,7 @@
#define ScriptWrappable_h
#include "bindings/core/v8/WrapperTypeInfo.h"
+#include "core/dom/ScriptForbiddenScope.h"
#include "platform/heap/Handle.h"
#include <v8.h>
@@ -265,6 +266,7 @@ private:
static void setWeakCallback(const v8::WeakCallbackData<v8::Object, ScriptWrappable>& data)
{
+ ScriptForbiddenScope forbiddenScope;
v8::Persistent<v8::Object> persistent;
data.GetParameter()->getPersistent(&persistent);
ASSERT(persistent == data.GetValue());

Powered by Google App Engine
This is Rietveld 408576698