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

Unified Diff: Source/bindings/dart/DartStringCache.cpp

Issue 185643003: Changes to use the modified dart API for (Closed) Base URL: svn://svn.chromium.org/blink/branches/dart/1750/
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/dart/DartStringCache.h ('k') | Source/bindings/dart/DartUtilities.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/dart/DartStringCache.cpp
===================================================================
--- Source/bindings/dart/DartStringCache.cpp (revision 168317)
+++ Source/bindings/dart/DartStringCache.cpp (working copy)
@@ -43,9 +43,10 @@
void DartStringCache::clearWeakHandles()
{
+ Dart_Isolate isolate = Dart_CurrentIsolate();
for (StringCache::iterator it = m_stringCache.begin(); it != m_stringCache.end(); ++it) {
it->key->deref();
- Dart_DeleteWeakPersistentHandle(it->value);
+ Dart_DeleteWeakPersistentHandle(isolate, it->value);
}
m_stringCache.clear();
m_lastStringImpl = 0;
@@ -84,17 +85,18 @@
return wrapper;
}
-void DartStringCache::handleFinalizer(Dart_WeakPersistentHandle handle, void* peer)
+void DartStringCache::handleFinalizer(Dart_Isolate isolate, Dart_WeakPersistentHandle handle, void* peer)
{
StringImpl* stringImpl = reinterpret_cast<StringImpl*>(peer);
- DartStringCache& stringCache = DartDOMData::current()->stringCache();
+ DartDOMData* domData = reinterpret_cast<DartDOMData*>(Dart_IsolateData(isolate));
+ DartStringCache& stringCache = domData->stringCache();
Dart_WeakPersistentHandle ALLOW_UNUSED cached = stringCache.m_stringCache.take(stringImpl);
ASSERT(handle == cached);
if (stringCache.m_lastDartString == handle) {
stringCache.m_lastStringImpl = 0;
stringCache.m_lastDartString = 0;
}
- Dart_DeleteWeakPersistentHandle(handle);
+ Dart_DeleteWeakPersistentHandle(isolate, handle);
stringImpl->deref();
}
« no previous file with comments | « Source/bindings/dart/DartStringCache.h ('k') | Source/bindings/dart/DartUtilities.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698