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

Unified Diff: Source/bindings/v8/SerializedScriptValue.cpp

Issue 125043004: Remove world type from hasInstance() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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/v8/ScriptProfiler.cpp ('k') | Source/bindings/v8/V8Binding.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/SerializedScriptValue.cpp
diff --git a/Source/bindings/v8/SerializedScriptValue.cpp b/Source/bindings/v8/SerializedScriptValue.cpp
index 68cdb9b173ea36bdf1c3a98eab0b5f33989fd6ed..5a21ae77dd40233ee01b375f612563b050bd2a28 100644
--- a/Source/bindings/v8/SerializedScriptValue.cpp
+++ b/Source/bindings/v8/SerializedScriptValue.cpp
@@ -1216,7 +1216,6 @@ Serializer::StateBase* Serializer::doSerialize(v8::Handle<v8::Value> value, Stat
m_writer.writeReferenceCount(m_nextObjectReference);
uint32_t objectReference;
uint32_t arrayBufferIndex;
- WrapperWorldType currentWorldType = worldType(m_isolate);
if ((value->IsObject() || value->IsDate() || value->IsRegExp())
&& m_objectPool.tryGet(value.As<v8::Object>(), &objectReference)) {
// Note that IsObject() also detects wrappers (eg, it will catch the things
@@ -1239,17 +1238,17 @@ Serializer::StateBase* Serializer::doSerialize(v8::Handle<v8::Value> value, Stat
m_writer.writeUint32(value->Uint32Value());
else if (value->IsNumber())
m_writer.writeNumber(value.As<v8::Number>()->Value());
- else if (V8ArrayBufferView::hasInstance(value, m_isolate, currentWorldType))
+ else if (V8ArrayBufferView::hasInstance(value, m_isolate))
return writeAndGreyArrayBufferView(value.As<v8::Object>(), next);
else if (value->IsString())
writeString(value);
- else if (V8MessagePort::hasInstance(value, m_isolate, currentWorldType)) {
+ else if (V8MessagePort::hasInstance(value, m_isolate)) {
uint32_t messagePortIndex;
if (m_transferredMessagePorts.tryGet(value.As<v8::Object>(), &messagePortIndex))
m_writer.writeTransferredMessagePort(messagePortIndex);
else
return handleError(DataCloneError, "A MessagePort could not be cloned.", next);
- } else if (V8ArrayBuffer::hasInstance(value, m_isolate, currentWorldType) && m_transferredArrayBuffers.tryGet(value.As<v8::Object>(), &arrayBufferIndex))
+ } else if (V8ArrayBuffer::hasInstance(value, m_isolate) && m_transferredArrayBuffers.tryGet(value.As<v8::Object>(), &arrayBufferIndex))
return writeTransferredArrayBuffer(value, arrayBufferIndex, next);
else {
v8::Handle<v8::Object> jsObject = value.As<v8::Object>();
@@ -1266,19 +1265,19 @@ Serializer::StateBase* Serializer::doSerialize(v8::Handle<v8::Value> value, Stat
writeBooleanObject(value);
else if (value->IsArray()) {
return startArrayState(value.As<v8::Array>(), next);
- } else if (V8File::hasInstance(value, m_isolate, currentWorldType))
+ } else if (V8File::hasInstance(value, m_isolate))
writeFile(value);
- else if (V8Blob::hasInstance(value, m_isolate, currentWorldType))
+ else if (V8Blob::hasInstance(value, m_isolate))
writeBlob(value);
- else if (V8DOMFileSystem::hasInstance(value, m_isolate, currentWorldType))
+ else if (V8DOMFileSystem::hasInstance(value, m_isolate))
return writeDOMFileSystem(value, next);
- else if (V8FileList::hasInstance(value, m_isolate, currentWorldType))
+ else if (V8FileList::hasInstance(value, m_isolate))
writeFileList(value);
- else if (V8ImageData::hasInstance(value, m_isolate, currentWorldType))
+ else if (V8ImageData::hasInstance(value, m_isolate))
writeImageData(value);
else if (value->IsRegExp())
writeRegExp(value);
- else if (V8ArrayBuffer::hasInstance(value, m_isolate, currentWorldType))
+ else if (V8ArrayBuffer::hasInstance(value, m_isolate))
return writeArrayBuffer(value, next);
else if (value->IsObject()) {
if (isHostObject(jsObject) || jsObject->IsCallable() || value->IsNativeError())
« no previous file with comments | « Source/bindings/v8/ScriptProfiler.cpp ('k') | Source/bindings/v8/V8Binding.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698