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

Unified Diff: Source/bindings/tests/results/V8Float64Array.cpp

Issue 15004016: Remove VTable-based binding integrity now that ScriptWrappable-based binding integrity is implement… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase, remove ImplementationLacksVTable attribute from template. 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
« no previous file with comments | « Source/bindings/scripts/IDLAttributes.txt ('k') | Source/bindings/tests/results/V8TestActiveDOMObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/tests/results/V8Float64Array.cpp
diff --git a/Source/bindings/tests/results/V8Float64Array.cpp b/Source/bindings/tests/results/V8Float64Array.cpp
index ff9e23619212dade1713b5c7256b795758572caf..5bb0e6ed97f5ec90f7245b561bc644fb58cb3057 100644
--- a/Source/bindings/tests/results/V8Float64Array.cpp
+++ b/Source/bindings/tests/results/V8Float64Array.cpp
@@ -42,40 +42,8 @@
#include "wtf/RefPtr.h"
#include "wtf/UnusedParam.h"
-#if ENABLE(BINDING_INTEGRITY)
-#if defined(OS_WIN)
-#pragma warning(disable: 4483)
-extern "C" { extern void (*const __identifier("??_7Float64Array@WebCore@@6B@")[])(); }
-#else
-extern "C" { extern void* _ZTVN7WebCore12Float64ArrayE[]; }
-#endif
-#endif // ENABLE(BINDING_INTEGRITY)
-
namespace WebCore {
-#if ENABLE(BINDING_INTEGRITY)
-// This checks if a DOM object that is about to be wrapped is valid.
-// Specifically, it checks that a vtable of the DOM object is equal to
-// a vtable of an expected class.
-// Due to a dangling pointer, the DOM object you are wrapping might be
-// already freed or realloced. If freed, the check will fail because
-// a free list pointer should be stored at the head of the DOM object.
-// If realloced, the check will fail because the vtable of the DOM object
-// differs from the expected vtable (unless the same class of DOM object
-// is realloced on the slot).
-inline void checkTypeOrDieTrying(Float64Array* object)
-{
- void* actualVTablePointer = *(reinterpret_cast<void**>(object));
-#if defined(OS_WIN)
- void* expectedVTablePointer = reinterpret_cast<void*>(__identifier("??_7Float64Array@WebCore@@6B@"));
-#else
- void* expectedVTablePointer = &_ZTVN7WebCore12Float64ArrayE[2];
-#endif
- if (actualVTablePointer != expectedVTablePointer)
- CRASH();
-}
-#endif // ENABLE(BINDING_INTEGRITY)
-
#if defined(OS_WIN)
// In ScriptWrappable, the use of extern function prototypes inside templated static methods has an issue on windows.
// These prototypes do not pick up the surrounding namespace, so drop out of WebCore as a workaround.
@@ -211,10 +179,6 @@ v8::Handle<v8::Object> V8Float64Array::createWrapper(PassRefPtr<Float64Array> im
{
ASSERT(impl.get());
ASSERT(DOMDataStore::getWrapper(impl.get(), isolate).IsEmpty());
-
-#if ENABLE(BINDING_INTEGRITY)
- checkTypeOrDieTrying(impl.get());
-#endif
ASSERT(static_cast<void*>(static_cast<ArrayBufferView*>(impl.get())) == static_cast<void*>(impl.get()));
v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext, &info, impl.get(), isolate);
« no previous file with comments | « Source/bindings/scripts/IDLAttributes.txt ('k') | Source/bindings/tests/results/V8TestActiveDOMObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698