Ignore:
Timestamp:
Oct 6, 2009, 7:06:03 PM (16 years ago)
Author:
[email protected]
Message:

It should be possible to post (clone) built-in JS objects to Workers
https://bugs.webkit.org/show_bug.cgi?id=22878

Reviewed by Gavin Barraclough.

Implement object cloning semantics for postMessage. Currently only
a partial implementation of the spec -- cloning of File, FileList,
ImageData, and RegExp were left out as they would have significantly
increased patch size.

Cloning requires multiple tree walks so we use a templated tree
walk function, allowing us to share a single implementation for
serialization, deserialization, and eventual destruction of the
serialized object tree.

Test: fast/dom/Window/window-postmessage-clone.html

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/ExceptionHelpers.h

    r46598 r49214  
    4545    JSValue createInterruptedExecutionException(JSGlobalData*);
    4646    JSValue createStackOverflowError(ExecState*);
     47    JSValue createTypeError(ExecState*, const char* message);
    4748    JSValue createUndefinedVariableError(ExecState*, const Identifier&, unsigned bytecodeOffset, CodeBlock*);
    4849    JSNotAnObjectErrorStub* createNotAnObjectErrorStub(ExecState*, bool isNull);
Note: See TracChangeset for help on using the changeset viewer.