Mihai, you are not missing anything, there currently isn't an API to create RegExps. It should be fairly simple to add if you want to give it a shot. Otherwise, please file a V8 bug and we will put it in the queue of things to add.
Thanks, -- Mads On Fri, Aug 27, 2010 at 4:37 AM, Mihai Parparita <[email protected]> wrote: > I'm looking to beef up WebKit's implementation of the "structured > cloning"* algorithm that is used for pushState, postMessage, etc. > Among other things, that mandates RegExp be cloned with the same > pattern and flags. On the V8 bindings side, this cloning is done by > http://trac.webkit.org/browser/trunk/WebCore/bindings/v8/SerializedScriptValue.cpp. > > Unfortunately, though I can use Value::IsRegExp to detect RegExp > instances, I don't see any way of extracting data from them (JSRegExp > isn't exposed in the API), or any way to create new ones. Am I missing > anything? > > Mihai > > * > http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#internal-structured-cloning-algorithm > > -- > v8-users mailing list > [email protected] > http://groups.google.com/group/v8-users > -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
