GC header file regoranisation

2017-11-16 Thread Jon Coppeard
In bug 1417123 I'm regorganising the GC header files a little.  In summary:

 - if you need to use JS::Rooted, JS::Handle and the like please include 
js/RootingAPI.h.
 - if you need to configure the GC or trigger a collection please include 
js/GCAPI.h.

The idea is to move everything required for using GC pointers to RootingAPI.h 
and everything required for controlling the GC to GCAPI.h.  The former should 
cover almost all cases.

Thanks,

Jon
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


JS modules are now enabled in nightly

2018-01-11 Thread Jon Coppeard
Just a heads up: JS module scripts (

Intent to implement and ship: import.meta in ES6 modules

2018-05-22 Thread Jon Coppeard
In an ES6 module, |import.meta| is new syntax that evaluates to an object that 
provides module-specific metadata from by the host environment.

Currently only the 'url' property is provided, which is the base URL of the 
executing module.  This allows modules to locate resources relative to the 
module, so that module authors can easily bundle resource files with their 
modules.

The ECMAScript proposal is at stage 3.

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1427610

Link to standard:

https://github.com/tc39/proposal-import-meta/blob/master/README.md

https://html.spec.whatwg.org/multipage/webappapis.html#hostgetimportmetaproperties

Platform coverage: All.

Estimated or target release: FF 62.

Preference behind which this will be implemented: None.

Is this feature enabled by default in sandboxed iframes? This is enabled
everywhere modules are enabled.  This preserves the current invariants. 

Do other browser engines implement this? Shipped in Chrome 64+ and Safari 42+.

web-platform-tests:

https://github.com/w3c/web-platform-tests/tree/master/html/semantics/scripting-1/the-script-element/module/import-meta

Secure contexts: This is new JS syntax that will be available in all modules, so
will not be restricted to secure contexts. 
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Intent to implement: Dynamic module imports (JS 'import()' syntax)

2018-10-18 Thread Jon Coppeard
Summary:

This introduces a function-like import() syntax to JS that imports an ES6 
module and returns a promise for that module's namespace.

We currently support static module imports and these should be used where 
possible.  However sometimes it's desirable to dynamically load code at 
runtime, for example to allow a module to be chosen based on information only 
known at runtime, or to support lazy loading of infrequently-used code.

Note that use of this feature is not restricted to ES6 modules but can be used 
to load modules from classic scripts.

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1342012

Link to standard:

This is currently a TC39 stage 3 proposal: 
https://github.com/tc39/proposal-dynamic-import
HTML spec changes: https://github.com/whatwg/html/pull/3044

Platform coverage: All platforms.

Estimated or target release: 65

Preference behind which this will be implemented: 
javascript.options.dynamicImport

Is this feature enabled by default in sandboxed iframes?

This features requires script execution and is allowed where script execution 
is allowed.

DevTools bug: I don't know whether there is DevTools work to do here or not.

Do other browser engines implement this?

Chrome shipped this in 63, Safari in 11.1, and it's in development in Edge.

web-platform-tests:

https://github.com/web-platform-tests/wpt/tree/master/html/semantics/scripting-1/the-script-element/module/dynamic-import

Is this feature restricted to secure contexts?

No, it's not restricted as it's part of script execution and works everywhere 
that is allowed.

Jon
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Intent to implement: Dynamic module imports (JS 'import()' syntax)

2018-10-22 Thread Jon Coppeard
On Saturday, 20 October 2018 09:54:05 UTC+1, David Baron  wrote:
> Have both Chrome and Safari shipped it without a secure context
> restriction?

Yes, it is supported outside of secure contexts in both Chrome and Safari.

Jon
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Dynamic module imports are now enabled on nightly

2019-01-30 Thread Jon Coppeard
Hi,

This is a heads-up that dynamic module imports have been enabled in nightly 
builds only for testing purposes.

Dynamic import is described here: 
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#Dynamic_Imports

Note that this feature works in both modules and classic scripts.

Please make any bugs block bug 1517546.

Cheers,

Jon
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Intent to ship: Dynamic module imports (JS 'import()' syntax)

2019-03-07 Thread Jon Coppeard
I intend to enable dynamic module import on by default, to ship in Firefox 67. 
It has been developed behind the javascript.options.dynamicImport preference. 
This is already shipping in Chrome, Safari and Opera.

Bug to turn on by default: https://bugzilla.mozilla.org/show_bug.cgi?id=1517546

This feature was previously discussed in this "intent to implement" thread:

https://groups.google.com/forum/#!searchin/mozilla.dev.platform/dynamic$20import%7Csort:date/mozilla.dev.platform/8xmgmr9wJhc/NfX34H9KBQAJ

Jon
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform