Index: third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp |
diff --git a/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp b/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp |
index df2907e44b0ccaa4c984120f191d15bb4c6b8b4f..912db456d7b6a161151cef12680409bf1a023e7a 100644 |
--- a/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp |
+++ b/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp |
@@ -137,7 +137,7 @@ |
OwnPtr<ArrayBufferContentsArray> contents = adoptPtr(new ArrayBufferContentsArray(arrayBuffers.size())); |
- HeapHashSet<Member<DOMArrayBufferBase>> visited; |
+ HashSet<DOMArrayBufferBase*> visited; |
for (size_t i = 0; i < arrayBuffers.size(); i++) { |
if (visited.contains(arrayBuffers[i].get())) |
continue; |
@@ -152,12 +152,12 @@ |
} else { |
Vector<v8::Local<v8::ArrayBuffer>, 4> bufferHandles; |
v8::HandleScope handleScope(isolate); |
- acculumateArrayBuffersForAllWorlds(isolate, static_cast<DOMArrayBuffer*>(arrayBuffers[i].get()), bufferHandles); |
+ acculumateArrayBuffersForAllWorlds(isolate, static_pointer_cast<DOMArrayBuffer>(arrayBuffers[i]).get(), bufferHandles); |
bool isNeuterable = true; |
for (size_t j = 0; j < bufferHandles.size(); j++) |
isNeuterable &= bufferHandles[j]->IsNeuterable(); |
- DOMArrayBufferBase* toTransfer = arrayBuffers[i]; |
+ RefPtr<DOMArrayBufferBase> toTransfer = arrayBuffers[i]; |
if (!isNeuterable) |
toTransfer = DOMArrayBuffer::create(arrayBuffers[i]->buffer()); |
bool result = toTransfer->transfer(contents->at(i)); |
@@ -233,26 +233,26 @@ |
} |
ports.append(port); |
} else if (V8ArrayBuffer::hasInstance(transferrable, isolate)) { |
- DOMArrayBuffer* arrayBuffer = V8ArrayBuffer::toImpl(v8::Local<v8::Object>::Cast(transferrable)); |
+ RefPtr<DOMArrayBuffer> arrayBuffer = V8ArrayBuffer::toImpl(v8::Local<v8::Object>::Cast(transferrable)); |
if (arrayBuffers.contains(arrayBuffer)) { |
exceptionState.throwDOMException(DataCloneError, "ArrayBuffer at index " + String::number(i) + " is a duplicate of an earlier ArrayBuffer."); |
return false; |
} |
- arrayBuffers.append(arrayBuffer); |
+ arrayBuffers.append(arrayBuffer.release()); |
} else if (V8SharedArrayBuffer::hasInstance(transferrable, isolate)) { |
- DOMSharedArrayBuffer* sharedArrayBuffer = V8SharedArrayBuffer::toImpl(v8::Local<v8::Object>::Cast(transferrable)); |
+ RefPtr<DOMSharedArrayBuffer> sharedArrayBuffer = V8SharedArrayBuffer::toImpl(v8::Local<v8::Object>::Cast(transferrable)); |
if (arrayBuffers.contains(sharedArrayBuffer)) { |
exceptionState.throwDOMException(DataCloneError, "SharedArrayBuffer at index " + String::number(i) + " is a duplicate of an earlier SharedArrayBuffer."); |
return false; |
} |
- arrayBuffers.append(sharedArrayBuffer); |
+ arrayBuffers.append(sharedArrayBuffer.release()); |
} else if (V8ImageBitmap::hasInstance(transferrable, isolate)) { |
- ImageBitmap* imageBitmap = V8ImageBitmap::toImpl(v8::Local<v8::Object>::Cast(transferrable)); |
+ RawPtr<ImageBitmap> imageBitmap = V8ImageBitmap::toImpl(v8::Local<v8::Object>::Cast(transferrable)); |
if (imageBitmaps.contains(imageBitmap)) { |
exceptionState.throwDOMException(DataCloneError, "ImageBitmap at index " + String::number(i) + " is a duplicate of an earlier ImageBitmap."); |
return false; |
} |
- imageBitmaps.append(imageBitmap); |
+ imageBitmaps.append(imageBitmap.release()); |
} else { |
exceptionState.throwTypeError("Value at index " + String::number(i) + " does not have a transferable type."); |
return false; |