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

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

Issue 1110433002: Make Isolate as the first argument. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix Compile error Created 5 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 | « 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 138
139 static bool containsWrapper(ScriptWrappable* object, v8::Isolate* isolate) 139 static bool containsWrapper(ScriptWrappable* object, v8::Isolate* isolate)
140 { 140 {
141 return current(isolate).containsWrapper(object); 141 return current(isolate).containsWrapper(object);
142 } 142 }
143 143
144 v8::Local<v8::Object> get(ScriptWrappable* object, v8::Isolate* isolate) 144 v8::Local<v8::Object> get(ScriptWrappable* object, v8::Isolate* isolate)
145 { 145 {
146 if (m_isMainWorld) 146 if (m_isMainWorld)
147 return object->newLocalWrapper(isolate); 147 return object->newLocalWrapper(isolate);
148 return m_wrapperMap->newLocal(object, isolate); 148 return m_wrapperMap->newLocal(isolate, object);
149 } 149 }
150 150
151 void setReference(const v8::Persistent<v8::Object>& parent, ScriptWrappable* child, v8::Isolate* isolate) 151 void setReference(const v8::Persistent<v8::Object>& parent, ScriptWrappable* child, v8::Isolate* isolate)
152 { 152 {
153 if (m_isMainWorld) { 153 if (m_isMainWorld) {
154 child->setReference(parent, isolate); 154 child->setReference(parent, isolate);
155 return; 155 return;
156 } 156 }
157 m_wrapperMap->setReference(parent, child, isolate); 157 m_wrapperMap->setReference(isolate, parent, child);
158 } 158 }
159 159
160 bool setReturnValueFrom(v8::ReturnValue<v8::Value> returnValue, ScriptWrappa ble* object) 160 bool setReturnValueFrom(v8::ReturnValue<v8::Value> returnValue, ScriptWrappa ble* object)
161 { 161 {
162 if (m_isMainWorld) 162 if (m_isMainWorld)
163 return object->setReturnValue(returnValue); 163 return object->setReturnValue(returnValue);
164 return m_wrapperMap->setReturnValueFrom(returnValue, object); 164 return m_wrapperMap->setReturnValueFrom(returnValue, object);
165 } 165 }
166 166
167 bool containsWrapper(ScriptWrappable* object) 167 bool containsWrapper(ScriptWrappable* object)
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 template <> 224 template <>
225 inline void DOMWrapperMap<ScriptWrappable>::PersistentValueMapTraits::DisposeWea k(v8::Isolate* isolate, void* internalFields[v8::kInternalFieldsInWeakCallback], ScriptWrappable* key) 225 inline void DOMWrapperMap<ScriptWrappable>::PersistentValueMapTraits::DisposeWea k(v8::Isolate* isolate, void* internalFields[v8::kInternalFieldsInWeakCallback], ScriptWrappable* key)
226 { 226 {
227 auto typeInfo = reinterpret_cast<WrapperTypeInfo*>(internalFields[v8DOMWrapp erTypeIndex]); 227 auto typeInfo = reinterpret_cast<WrapperTypeInfo*>(internalFields[v8DOMWrapp erTypeIndex]);
228 typeInfo->derefObject(key); 228 typeInfo->derefObject(key);
229 } 229 }
230 230
231 } // namespace blink 231 } // namespace blink
232 232
233 #endif // DOMDataStore_h 233 #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