Bug 95325

Summary: [Qt] Change custom runtime conversion functions to use the JSC C API
Product: WebKit Reporter: Simon Hausmann <hausmann>
Component: New BugsAssignee: Simon Hausmann <hausmann>
Status: RESOLVED INVALID    
Severity: Normal CC: allan.jensen, cmarcelo
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 60842, 95570    
Attachments:
Description Flags
Patch none

Description Simon Hausmann 2012-08-29 04:41:48 PDT
[Qt] Change custom runtime conversion functions to use the JSC C API
Comment 1 Simon Hausmann 2012-08-29 04:47:35 PDT
Created attachment 161185 [details]
Patch
Comment 2 Caio Marcelo de Oliveira Filho 2012-08-30 07:25:08 PDT
Comment on attachment 161185 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=161185&action=review

> Source/WebCore/bridge/qt/qt_runtime.cpp:747
> -    if (customRuntimeConversions()->contains(type)) {
> -        if (!root->globalObject()->inherits(&JSDOMWindow::s_info))
> -            return JSValueMakeUndefined(context);
> -
> -        Document* document = (static_cast<JSDOMWindow*>(root->globalObject()))->impl()->document();
> -        if (!document)
> -            return JSValueMakeUndefined(context);
> -        ExecState* exec = toJS(context);
> -        return toRef(exec, customRuntimeConversions()->value(type).toJSValueFunc(exec, toJSDOMGlobalObject(document, exec), variant));
> -    }
> +    if (customRuntimeConversions()->contains(type))
> +        return customRuntimeConversions()->value(type).toJSValueFunc(context, variant);

The change looks good to me, but I'm not entire sure that there will be edge situations where this won't work. By "this" I mean: using the current context (and global object) instead of the global object tied to the cacheable root object (that we use in the bridge). In general the cacheable root object is updated, so we'll probably get the same values here.
Comment 3 Anders Carlsson 2013-10-02 21:14:45 PDT
Comment on attachment 161185 [details]
Patch

Qt has been removed, clearing review flags.
Comment 4 Allan Sandfeld Jensen 2014-02-03 02:33:58 PST
Simon, is this still relevant for the QtWebKit branch?
Comment 5 Jocelyn Turcotte 2014-02-03 03:22:16 PST
=== Bulk closing of Qt bugs ===

If you believe that this bug report is still relevant for a non-Qt port of webkit.org, please re-open it and remove [Qt] from the summary.

If you believe that this is still an important QtWebKit bug, please fill a new report at https://bugreports.qt-project.org and add a link to this issue. See http://qt-project.org/wiki/ReportingBugsInQt for additional guidelines.