Bug 166888 - Decouple module loading initiator from ScriptElement
Summary: Decouple module loading initiator from ScriptElement
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords:
Depends on:
Blocks: 166925
  Show dependency treegraph
 
Reported: 2017-01-10 06:31 PST by Yusuke Suzuki
Modified: 2017-01-11 07:19 PST (History)
6 users (show)

See Also:


Attachments
Patch (57.69 KB, patch)
2017-01-10 06:37 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (57.80 KB, patch)
2017-01-10 18:49 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (57.82 KB, patch)
2017-01-10 19:15 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (57.68 KB, patch)
2017-01-11 02:33 PST, Yusuke Suzuki
rniwa: review+
Details | Formatted Diff | Diff
Patch for landing (91.89 KB, patch)
2017-01-11 04:09 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2017-01-10 06:31:28 PST
Decouple module loading initiator from ScriptElement
Comment 1 Yusuke Suzuki 2017-01-10 06:37:32 PST
Created attachment 298460 [details]
Patch
Comment 2 Yusuke Suzuki 2017-01-10 18:49:59 PST
Created attachment 298545 [details]
Patch
Comment 3 Yusuke Suzuki 2017-01-10 19:15:33 PST
Created attachment 298546 [details]
Patch
Comment 4 Saam Barati 2017-01-11 02:21:26 PST
Comment on attachment 298546 [details]
Patch

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

This LGTM, but it's worth having somebody else who knows the WebCore bits more than I do give the thumbs up.

> Source/JavaScriptCore/runtime/JSScriptInitiator.h:2
> + * Copyright (C) 2016 Yusuke Suzuki <utatane.tea@gmail.com>

2017

> Source/JavaScriptCore/runtime/ScriptInitiator.h:2
> + * Copyright (C) 2016 Yusuke Suzuki <utatane.tea@gmail.com>

2017

> Source/WebCore/ForwardingHeaders/runtime/JSScriptInitiator.h:2
> + * Copyright (C) 2016 Yusuke Suzuki <utatane.tea@gmail.com>

2017

> Source/WebCore/ForwardingHeaders/runtime/ScriptInitiator.h:2
> + * Copyright (C) 2016 Yusuke Suzuki <utatane.tea@gmail.com>

2017
Comment 5 Yusuke Suzuki 2017-01-11 02:30:17 PST
Comment on attachment 298546 [details]
Patch

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

Thanks :)

>> Source/JavaScriptCore/runtime/JSScriptInitiator.h:2
>> + * Copyright (C) 2016 Yusuke Suzuki <utatane.tea@gmail.com>
> 
> 2017

Fixed.

>> Source/JavaScriptCore/runtime/ScriptInitiator.h:2
>> + * Copyright (C) 2016 Yusuke Suzuki <utatane.tea@gmail.com>
> 
> 2017

Fixed.

>> Source/WebCore/ForwardingHeaders/runtime/JSScriptInitiator.h:2
>> + * Copyright (C) 2016 Yusuke Suzuki <utatane.tea@gmail.com>
> 
> 2017

Fixed.

>> Source/WebCore/ForwardingHeaders/runtime/ScriptInitiator.h:2
>> + * Copyright (C) 2016 Yusuke Suzuki <utatane.tea@gmail.com>
> 
> 2017

Fixed.
Comment 6 Yusuke Suzuki 2017-01-11 02:33:36 PST
Created attachment 298564 [details]
Patch
Comment 7 Ryosuke Niwa 2017-01-11 02:47:27 PST
Comment on attachment 298546 [details]
Patch

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

> Source/JavaScriptCore/ChangeLog:17
> +        * runtime/JSScriptInitiator.cpp: Copied from Source/WebCore/dom/LoadableScript.cpp.
> +        (JSC::JSScriptInitiator::destroy):
> +        * runtime/JSScriptInitiator.h: Added.

I'm not sure if "initiator" is a good name for this. How about ScriptLoader or ScriptFetcher?
Or perhaps ScriptOrigin?
Comment 8 Ryosuke Niwa 2017-01-11 02:48:02 PST
Comment on attachment 298564 [details]
Patch

r=me with my previous comments.
Comment 9 Yusuke Suzuki 2017-01-11 03:21:37 PST
Comment on attachment 298546 [details]
Patch

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

Thank you for your review.

>> Source/JavaScriptCore/ChangeLog:17
>> +        * runtime/JSScriptInitiator.h: Added.
> 
> I'm not sure if "initiator" is a good name for this. How about ScriptLoader or ScriptFetcher?
> Or perhaps ScriptOrigin?

I think `ScriptFetcher` is better since ScriptLoader is ambiguous with ModuleLoader thing in JSC.
Comment 10 Yusuke Suzuki 2017-01-11 04:09:58 PST
Created attachment 298567 [details]
Patch for landing
Comment 11 Yusuke Suzuki 2017-01-11 04:13:46 PST
Committed r210585: <http://trac.webkit.org/changeset/210585>