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

Side by Side Diff: Source/bindings/v8/WrapperTypeInfo.h

Issue 211373002: Oilpan: move DOMWindow object to the oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: setNativeInfoForInnerGlobalObject() -> setNativeInfoForHiddenWrapper() Created 6 years, 9 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 unified diff | Download patch
« no previous file with comments | « Source/bindings/v8/V8WindowShell.cpp ('k') | Source/bindings/v8/custom/V8WindowCustom.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 // Persistent handle is stored in the last internal field. 185 // Persistent handle is stored in the last internal field.
186 return static_cast<PersistentNode*>(wrapper->GetAlignedPointerFromIntern alField(wrapper->InternalFieldCount() - 1)); 186 return static_cast<PersistentNode*>(wrapper->GetAlignedPointerFromIntern alField(wrapper->InternalFieldCount() - 1));
187 } 187 }
188 188
189 inline void releaseObject(v8::Handle<v8::Object> wrapper) 189 inline void releaseObject(v8::Handle<v8::Object> wrapper)
190 { 190 {
191 const WrapperTypeInfo* typeInfo = toWrapperTypeInfo(wrapper); 191 const WrapperTypeInfo* typeInfo = toWrapperTypeInfo(wrapper);
192 #if ENABLE(OILPAN) 192 #if ENABLE(OILPAN)
193 if (typeInfo->isGarbageCollected) { 193 if (typeInfo->isGarbageCollected) {
194 const PersistentNode* handle = toPersistentHandle(wrapper); 194 const PersistentNode* handle = toPersistentHandle(wrapper);
195 ASSERT(handle); 195 // This will be null iff a wrapper for a hidden wrapper object,
196 // see V8DOMWrapper::setNativeInfoForHiddenWrapper().
196 delete handle; 197 delete handle;
197 } else { 198 } else {
198 ASSERT(typeInfo->derefObjectFunction); 199 ASSERT(typeInfo->derefObjectFunction);
199 typeInfo->derefObjectFunction(toNative(wrapper)); 200 typeInfo->derefObjectFunction(toNative(wrapper));
200 } 201 }
201 #else 202 #else
202 ASSERT(typeInfo->derefObjectFunction); 203 ASSERT(typeInfo->derefObjectFunction);
203 typeInfo->derefObjectFunction(toNative(wrapper)); 204 typeInfo->derefObjectFunction(toNative(wrapper));
204 #endif 205 #endif
205 } 206 }
(...skipping 22 matching lines...) Expand all
228 } 229 }
229 230
230 inline WrapperConfiguration buildWrapperConfiguration(Node*, WrapperConfigur ation::Lifetime lifetime) 231 inline WrapperConfiguration buildWrapperConfiguration(Node*, WrapperConfigur ation::Lifetime lifetime)
231 { 232 {
232 WrapperConfiguration configuration = {v8DOMNodeClassId, lifetime}; 233 WrapperConfiguration configuration = {v8DOMNodeClassId, lifetime};
233 return configuration; 234 return configuration;
234 } 235 }
235 } 236 }
236 237
237 #endif // WrapperTypeInfo_h 238 #endif // WrapperTypeInfo_h
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8WindowShell.cpp ('k') | Source/bindings/v8/custom/V8WindowCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698