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

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

Issue 180363004: Convert DOMWrapperMap to use PersistentValueMap (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Adapt to changes in v8-util.h Created 6 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 unified diff | Download patch
« no previous file with comments | « Source/bindings/v8/V8NPObject.cpp ('k') | no next file » | 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 typeInfo->derefObjectFunction(toNative(wrapper)); 204 typeInfo->derefObjectFunction(toNative(wrapper));
205 #endif 205 #endif
206 } 206 }
207 207
208 struct WrapperConfiguration { 208 struct WrapperConfiguration {
209 209
210 enum Lifetime { 210 enum Lifetime {
211 Dependent, Independent 211 Dependent, Independent
212 }; 212 };
213 213
214 void configureWrapper(v8::Persistent<v8::Object>* wrapper) const 214 void configureWrapper(v8::PersistentBase<v8::Object>* wrapper) const
215 { 215 {
216 wrapper->SetWrapperClassId(classId); 216 wrapper->SetWrapperClassId(classId);
217 if (lifetime == Independent) 217 if (lifetime == Independent)
218 wrapper->MarkIndependent(); 218 wrapper->MarkIndependent();
219 } 219 }
220 220
221 const uint16_t classId; 221 const uint16_t classId;
222 const Lifetime lifetime; 222 const Lifetime lifetime;
223 }; 223 };
224 224
225 inline WrapperConfiguration buildWrapperConfiguration(void*, WrapperConfigur ation::Lifetime lifetime) 225 inline WrapperConfiguration buildWrapperConfiguration(void*, WrapperConfigur ation::Lifetime lifetime)
226 { 226 {
227 WrapperConfiguration configuration = {v8DOMObjectClassId, lifetime}; 227 WrapperConfiguration configuration = {v8DOMObjectClassId, lifetime};
228 return configuration; 228 return configuration;
229 } 229 }
230 230
231 inline WrapperConfiguration buildWrapperConfiguration(Node*, WrapperConfigur ation::Lifetime lifetime) 231 inline WrapperConfiguration buildWrapperConfiguration(Node*, WrapperConfigur ation::Lifetime lifetime)
232 { 232 {
233 WrapperConfiguration configuration = {v8DOMNodeClassId, lifetime}; 233 WrapperConfiguration configuration = {v8DOMNodeClassId, lifetime};
234 return configuration; 234 return configuration;
235 } 235 }
236 } 236 }
237 237
238 #endif // WrapperTypeInfo_h 238 #endif // WrapperTypeInfo_h
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8NPObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698