Title: [115374] trunk/Source/WebCore
Revision
115374
Author
[email protected]
Date
2012-04-26 14:53:18 -0700 (Thu, 26 Apr 2012)

Log Message

[V8] Pass Isolate to wrap() in SerializedScriptValue.cpp
https://bugs.webkit.org/show_bug.cgi?id=84923

Reviewed by Nate Chapin.

The objective is to pass Isolate around in V8 bindings.
In this bug we pass Isolate to wrap() in SerializedScriptValue.cpp.

No tests. No change in behavior.

* bindings/v8/SerializedScriptValue.cpp:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (115373 => 115374)


--- trunk/Source/WebCore/ChangeLog	2012-04-26 21:51:00 UTC (rev 115373)
+++ trunk/Source/WebCore/ChangeLog	2012-04-26 21:53:18 UTC (rev 115374)
@@ -1,3 +1,17 @@
+2012-04-26  Kentaro Hara  <[email protected]>
+
+        [V8] Pass Isolate to wrap() in SerializedScriptValue.cpp
+        https://bugs.webkit.org/show_bug.cgi?id=84923
+
+        Reviewed by Nate Chapin.
+
+        The objective is to pass Isolate around in V8 bindings.
+        In this bug we pass Isolate to wrap() in SerializedScriptValue.cpp.
+
+        No tests. No change in behavior.
+
+        * bindings/v8/SerializedScriptValue.cpp:
+
 2012-04-26  Hao Zheng  <[email protected]>
 
         [chromium] Complex text support for Android.

Modified: trunk/Source/WebCore/bindings/v8/SerializedScriptValue.cpp (115373 => 115374)


--- trunk/Source/WebCore/bindings/v8/SerializedScriptValue.cpp	2012-04-26 21:51:00 UTC (rev 115373)
+++ trunk/Source/WebCore/bindings/v8/SerializedScriptValue.cpp	2012-04-26 21:53:18 UTC (rev 115374)
@@ -504,6 +504,7 @@
         doWriteUint32(length);
     }
 
+    v8::Isolate* getIsolate() { return m_isolate; }
 
 private:
     void doWriteArrayBuffer(const ArrayBuffer& arrayBuffer)
@@ -618,11 +619,11 @@
         ASSERT(!tryCatch.HasCaught());
         if (messagePorts) {
             for (size_t i = 0; i < messagePorts->size(); i++)
-                m_transferredMessagePorts.set(V8MessagePort::wrap(messagePorts->at(i).get()), i);
+                m_transferredMessagePorts.set(V8MessagePort::wrap(messagePorts->at(i).get(), m_writer.getIsolate()), i);
         }
         if (arrayBuffers) {
             for (size_t i = 0; i < arrayBuffers->size(); i++)  {
-                v8::Handle<v8::Object> v8ArrayBuffer = V8ArrayBuffer::wrap(arrayBuffers->at(i).get());
+                v8::Handle<v8::Object> v8ArrayBuffer = V8ArrayBuffer::wrap(arrayBuffers->at(i).get(), m_writer.getIsolate());
                 // Coalesce multiple occurences of the same buffer to the first index.
                 if (!m_transferredArrayBuffers.contains(v8ArrayBuffer))
                     m_transferredArrayBuffers.set(v8ArrayBuffer, i);
@@ -1024,7 +1025,7 @@
             return 0;
         if (!arrayBufferView->buffer())
             return handleError(DataCloneError, next);
-        v8::Handle<v8::Value> underlyingBuffer = toV8(arrayBufferView->buffer());
+        v8::Handle<v8::Value> underlyingBuffer = toV8(arrayBufferView->buffer(), m_writer.getIsolate());
         if (underlyingBuffer.IsEmpty())
             return handleError(DataCloneError, next);
         StateBase* stateOut = doSerialize(underlyingBuffer, 0);
@@ -1468,6 +1469,8 @@
         m_version = version;
     }
 
+    v8::Isolate* getIsolate() { return m_isolate; }
+
 private:
     bool readTag(SerializationTag* tag)
     {
@@ -1958,7 +1961,7 @@
             return false;
         if (index >= m_transferredMessagePorts->size())
             return false;
-        *object = V8MessagePort::wrap(m_transferredMessagePorts->at(index).get());
+        *object = V8MessagePort::wrap(m_transferredMessagePorts->at(index).get(), m_reader.getIsolate());
         return true;
     }
 
@@ -1970,7 +1973,7 @@
             return false;
         v8::Handle<v8::Object> result = m_arrayBuffers.at(index);
         if (result.IsEmpty()) {
-            result = V8ArrayBuffer::wrap(ArrayBuffer::create(m_arrayBufferContents->at(index)).get());
+            result = V8ArrayBuffer::wrap(ArrayBuffer::create(m_arrayBufferContents->at(index)).get(), m_reader.getIsolate());
             m_arrayBuffers[index] = result;
         }
         *object = result;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to