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

Side by Side Diff: Source/bindings/core/v8/DOMDataStore.h

Issue 460673002: bindings: Changes DOMWrapperMap::KeyType to ScriptWrappableBase*. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/bindings/core/v8/DOMWrapperMap.h » ('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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 197
198 static bool holderContainsWrapper(v8::Local<v8::Object> holder, ScriptWrappa ble* wrappable) 198 static bool holderContainsWrapper(v8::Local<v8::Object> holder, ScriptWrappa ble* wrappable)
199 { 199 {
200 // Verify our assumptions about the main world. 200 // Verify our assumptions about the main world.
201 ASSERT(wrappable); 201 ASSERT(wrappable);
202 ASSERT(!wrappable->containsWrapper() || !wrappable->isEqualTo(holder) || current(v8::Isolate::GetCurrent()).m_isMainWorld); 202 ASSERT(!wrappable->containsWrapper() || !wrappable->isEqualTo(holder) || current(v8::Isolate::GetCurrent()).m_isMainWorld);
203 return wrappable->isEqualTo(holder); 203 return wrappable->isEqualTo(holder);
204 } 204 }
205 205
206 bool m_isMainWorld; 206 bool m_isMainWorld;
207 DOMWrapperMap<void> m_wrapperMap; 207 DOMWrapperMap<ScriptWrappableBase> m_wrapperMap;
208 }; 208 };
209 209
210 template <>
211 inline void DOMWrapperMap<ScriptWrappableBase>::PersistentValueMapTraits::Dispos e(
212 v8::Isolate* isolate,
213 v8::UniquePersistent<v8::Object> value,
214 ScriptWrappableBase* key)
215 {
216 RELEASE_ASSERT(!value.IsEmpty()); // See crbug.com/368095.
217 releaseObject(v8::Local<v8::Object>::New(isolate, value));
218 }
219
210 } // namespace blink 220 } // namespace blink
211 221
212 #endif // DOMDataStore_h 222 #endif // DOMDataStore_h
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/core/v8/DOMWrapperMap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698