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

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: Update to match changes in v8-util.h. 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
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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 typeInfo->derefObjectFunction(toNative(wrapper)); 203 typeInfo->derefObjectFunction(toNative(wrapper));
204 #endif 204 #endif
205 } 205 }
206 206
207 struct WrapperConfiguration { 207 struct WrapperConfiguration {
208 208
209 enum Lifetime { 209 enum Lifetime {
210 Dependent, Independent 210 Dependent, Independent
211 }; 211 };
212 212
213 void configureWrapper(v8::Persistent<v8::Object>* wrapper) const 213 void configureWrapper(v8::PersistentBase<v8::Object>* wrapper) const
214 { 214 {
215 wrapper->SetWrapperClassId(classId); 215 wrapper->SetWrapperClassId(classId);
216 if (lifetime == Independent) 216 if (lifetime == Independent)
217 wrapper->MarkIndependent(); 217 wrapper->MarkIndependent();
218 } 218 }
219 219
220 const uint16_t classId; 220 const uint16_t classId;
221 const Lifetime lifetime; 221 const Lifetime lifetime;
222 }; 222 };
223 223
224 inline WrapperConfiguration buildWrapperConfiguration(void*, WrapperConfigur ation::Lifetime lifetime) 224 inline WrapperConfiguration buildWrapperConfiguration(void*, WrapperConfigur ation::Lifetime lifetime)
225 { 225 {
226 WrapperConfiguration configuration = {v8DOMObjectClassId, lifetime}; 226 WrapperConfiguration configuration = {v8DOMObjectClassId, lifetime};
227 return configuration; 227 return configuration;
228 } 228 }
229 229
230 inline WrapperConfiguration buildWrapperConfiguration(Node*, WrapperConfigur ation::Lifetime lifetime) 230 inline WrapperConfiguration buildWrapperConfiguration(Node*, WrapperConfigur ation::Lifetime lifetime)
231 { 231 {
232 WrapperConfiguration configuration = {v8DOMNodeClassId, lifetime}; 232 WrapperConfiguration configuration = {v8DOMNodeClassId, lifetime};
233 return configuration; 233 return configuration;
234 } 234 }
235 } 235 }
236 236
237 #endif // WrapperTypeInfo_h 237 #endif // WrapperTypeInfo_h
OLDNEW
« Source/bindings/v8/V8NPObject.cpp ('K') | « Source/bindings/v8/V8NPObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698