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

Unified Diff: Source/bindings/tests/results/V8TestActiveDOMObject.h

Issue 14348032: Perfrorm binding integrity check using scriptwrappable. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 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 side-by-side diff with in-line comments
Download patch
Index: Source/bindings/tests/results/V8TestActiveDOMObject.h
diff --git a/Source/bindings/tests/results/V8TestActiveDOMObject.h b/Source/bindings/tests/results/V8TestActiveDOMObject.h
index 491a3aa99138a1f5f3bb7a677b92faa7eafbccc3..827c5eb7ab7b0298dd261a0e41703e6e9ff70dfd 100644
--- a/Source/bindings/tests/results/V8TestActiveDOMObject.h
+++ b/Source/bindings/tests/results/V8TestActiveDOMObject.h
@@ -62,6 +62,11 @@ inline v8::Handle<v8::Object> wrap(TestActiveDOMObject* impl, v8::Handle<v8::Obj
{
ASSERT(impl);
ASSERT(DOMDataStore::getWrapper(impl, isolate).IsEmpty());
+ if (ScriptWrappable::wrapperCanBeStoredInObject(impl)) {
+ const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObject(impl);
+ if (actualInfo != &V8TestActiveDOMObject::info)
+ CRASH();
+ }
return V8TestActiveDOMObject::createWrapper(impl, creationContext, isolate);
}

Powered by Google App Engine
This is Rietveld 408576698