This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function wu(thing) { | |
| return new wu.Iterable(thing); | |
| } | |
| // This is known as @@iterator in the ES6 spec. Until it is bound to some | |
| // well-known name or importable, find the @@iterator object by expecting it | |
| // as the first property accessed on a for-of iterable. | |
| // | |
| // This shim is thanks to @andywingo via @gozala. | |
| const iteratorSymbol = (function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let { devtools } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); | |
| function openToolbox() { | |
| let target = devtools.TargetFactory.forTab(gBrowser.selectedTab); | |
| return gDevTools.showToolbox(target, "jsdebugger"); | |
| } | |
| function closeToolbox() { | |
| let target = devtools.TargetFactory.forTab(gBrowser.selectedTab); | |
| return gDevTools.closeToolbox(target); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function* asyncIterator() { | |
| let value, done; | |
| while ({value, done} = (yield null), !done) { | |
| console.log("got", value); | |
| } | |
| console.log("done"); | |
| } | |
| it = asyncIterator(); | |
| it.next(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Cu.import("resource://gre/modules/jsdebugger.jsm"); | |
| addDebuggerToGlobal(this); | |
| let browser = gBrowser.getBrowserForTab(gBrowser.selectedTab); | |
| let contentWindow = browser.contentWindow; | |
| let dbg = new Debugger(contentWindow); | |
| let start = Date.now(); | |
| dbg.memory.captureDominatorTree(contentWindow) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "use strict"; | |
| var immut = (function () { | |
| var descriptor = { | |
| value: null | |
| }; | |
| return function immut() { | |
| if (arguments.length % 2 !== 0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Proposed Format | |
| { | |
| ... | |
| 7. sources: ["baz.ts", "foo.js", "bar.js"] | |
| ... | |
| 9. mediaTypes: ["application/javascript", "application/x.typescript"], | |
| 10. sourcesMediaTypes: "CAA", | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/browser/devtools/debugger/test/head.js b/browser/devtools/debugger/test/head.js | |
| index 1c97620..5dd4070 100644 | |
| --- a/browser/devtools/debugger/test/head.js | |
| +++ b/browser/devtools/debugger/test/head.js | |
| @@ -734,17 +734,24 @@ function closeDebuggerAndFinish(aPanel, aFlags = {}) { | |
| "unless you're absolutely sure about what you're doing."); | |
| } | |
| return teardown(aPanel, aFlags).then(finish); | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var d = Object.create(Date.prototype); | |
| Date.call(d); | |
| d instanceof Date // true | |
| d.getTime() // throws an Error! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let foo = 1; | |
| let bar = 2; | |
| let obj = { foo, bar }; | |
| obj.foo // 1 | |
| obj.bar // 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var smc = new SourceMapConsumer(theSourceMapJSON); | |
| var smg = SourceMapGenerator.fromSourceMap(smc); | |
| smc.sources.forEach(function (s) { | |
| smg.setSourceContent(s, somehowGetTheSourceContentsOf(s)); | |
| }); | |
| // This is your modified map. | |
| smg.toJSON(); |