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

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

Issue 14348032: Perfrorm binding integrity check using scriptwrappable. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: roll in fix from https://codereview.chromium.org/14520011/ Created 7 years, 7 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/V8TestEventTarget.h
diff --git a/Source/bindings/tests/results/V8TestEventTarget.h b/Source/bindings/tests/results/V8TestEventTarget.h
index e261da2b7800f22164771fc8c19a41990bceb0be..e72c9f8ab51d5a01d6e1c36df0bf75aa96781cd0 100644
--- a/Source/bindings/tests/results/V8TestEventTarget.h
+++ b/Source/bindings/tests/results/V8TestEventTarget.h
@@ -66,6 +66,12 @@ inline v8::Handle<v8::Object> wrap(TestEventTarget* impl, v8::Handle<v8::Object>
{
ASSERT(impl);
ASSERT(DOMDataStore::getWrapper(impl, isolate).IsEmpty());
+ if (ScriptWrappable::wrapperCanBeStoredInObject(impl)) {
+ const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObject(impl);
+ // Might be a XXXConstructor::info instead of an XXX::info. These will both have
+ // the same object de-ref functions, though, so use that as the basis of the check.
+ RELEASE_ASSERT(actualInfo->derefObjectFunction == V8TestEventTarget::info.derefObjectFunction);
+ }
return V8TestEventTarget::createWrapper(impl, creationContext, isolate);
}
« no previous file with comments | « Source/bindings/tests/results/V8TestEventConstructor.h ('k') | Source/bindings/tests/results/V8TestException.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698