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(); |
} |