forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1688791 - Part 1: Remove saveBytecode option from evaluate shell …
…function. r=tcampbell Differential Revision: https://phabricator.services.mozilla.com/D121267
- Loading branch information
Showing
13 changed files
with
24 additions
and
153 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,6 @@ | ||
load(libdir + "asserts.js") | ||
|
||
// JS::EncodeScript cannot be use for run-once scripts. | ||
evaluate(cacheEntry(""), { saveBytecode: true }); | ||
evaluate(cacheEntry(""), { saveBytecode: true, isRunOnce: false }); | ||
assertErrorMessage(() => { | ||
evaluate(cacheEntry(""), { saveBytecode: true, isRunOnce: true }); | ||
}, Error, "run-once script are not supported by XDR"); | ||
|
||
// Incremental XDR doesn't have any of these restrictions. | ||
// Incremental XDR doesn't have run-once script restrictions. | ||
evaluate(cacheEntry(""), { saveIncrementalBytecode: true }); | ||
evaluate(cacheEntry(""), { saveIncrementalBytecode: true, isRunOnce: false }); | ||
evaluate(cacheEntry(""), { saveIncrementalBytecode: true, isRunOnce: true }); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
var code = cacheEntry("(x => JSON.stringify(x))`bar`;"); | ||
var g = newGlobal({ cloneSingletons: true }); | ||
assertEq("[\"bar\"]", evaluate(code, { global: g, saveBytecode: true })); | ||
assertEq("[\"bar\"]", evaluate(code, { global: g, loadBytecode: true })); | ||
assertEq("[\"bar\"]", evaluate(code, { global: g, saveIncrementalBytecode: true })); | ||
assertEq("[\"bar\"]", evaluate(code, { global: g, saveIncrementalBytecode: true })); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
var code = cacheEntry("assertEq('bar', String.raw`bar`);"); | ||
var g = newGlobal({ cloneSingletons: true }); | ||
evaluate(code, { global: g, saveBytecode: true }); | ||
evaluate(code, { global: g, saveIncrementalBytecode: true }); | ||
evaluate(code, { global: g, loadBytecode: true }) |
Oops, something went wrong.