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

Unified Diff: Source/bindings/v8/WrapperTypeInfo.h

Issue 139173012: Move encryptedmedia module to oilpan (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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/v8/WrapperTypeInfo.h
diff --git a/Source/bindings/v8/WrapperTypeInfo.h b/Source/bindings/v8/WrapperTypeInfo.h
index ec66efc996b772dd4ca3b34e68c969e2def93f86..2813aa6cc6355d18f849dc19fa4524dfebcdd21d 100644
--- a/Source/bindings/v8/WrapperTypeInfo.h
+++ b/Source/bindings/v8/WrapperTypeInfo.h
@@ -45,11 +45,6 @@ namespace WebCore {
static const int v8DOMWrapperTypeIndex = static_cast<int>(gin::kWrapperInfoIndex);
static const int v8DOMWrapperObjectIndex = static_cast<int>(gin::kEncodedValueIndex);
static const int v8DefaultWrapperInternalFieldCount = static_cast<int>(gin::kNumberOfInternalFields);
- // If we have v8PersistentHandleIndex, it should be the first index of the custom internal fields.
- // This contract is needed to keep the index consistent with generated code.
- // FIXME: oilpan: Don't add an extra internal field for storing a persistent handle.
- // Instead we should reuse the internal field of v8DOMWrapperObjectIndex.
- static const int v8PersistentHandleIndex = v8DefaultWrapperInternalFieldCount;
static const int v8PrototypeTypeIndex = 0;
static const int v8PrototypeInternalFieldcount = 1;
@@ -190,7 +185,8 @@ namespace WebCore {
inline const PersistentNode* toPersistentHandle(const v8::Handle<v8::Object>& wrapper)
{
- return getInternalField<PersistentNode, v8PersistentHandleIndex>(wrapper);
+ // Persistent handle is stored in the last internal field.
+ return static_cast<PersistentNode*>(wrapper->GetAlignedPointerFromInternalField(wrapper->InternalFieldCount() - 1));
}
inline void releaseObject(v8::Handle<v8::Object> wrapper)

Powered by Google App Engine
This is Rietveld 408576698