Bug 95325 - [Qt] Change custom runtime conversion functions to use the JSC C API
Summary: [Qt] Change custom runtime conversion functions to use the JSC C API
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Hausmann
Depends on:
Blocks: 60842 95570
  Show dependency treegraph
Reported: 2012-08-29 04:41 PDT by Simon Hausmann
Modified: 2014-02-03 03:22 PST (History)
2 users (show)

See Also:

Patch (8.17 KB, patch)
2012-08-29 04:47 PDT, Simon Hausmann
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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]
Comment 2 Caio Marcelo de Oliveira Filho 2012-08-30 07:25:08 PDT
Comment on attachment 161185 [details]

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]

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.