mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-30 21:55:31 +00:00
Bug 829798 - Add dummy PreserveWrapper to JS shell. r=billm
This commit is contained in:
parent
92dae8e55e
commit
eadd687c13
1
js/src/jit-test/tests/basic/testFakeDOMWeakmapKey.js
Normal file
1
js/src/jit-test/tests/basic/testFakeDOMWeakmapKey.js
Normal file
@ -0,0 +1 @@
|
||||
(new WeakMap).set(FakeDOMObject.prototype, this)
|
@ -5219,6 +5219,13 @@ JSSecurityCallbacks securityCallbacks = {
|
||||
NULL
|
||||
};
|
||||
|
||||
/* Pretend we can always preserve wrappers for dummy DOM objects. */
|
||||
static bool
|
||||
DummyPreserveWrapperCallback(JSContext *cx, JSObject *obj)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char **argv, char **envp)
|
||||
{
|
||||
@ -5382,6 +5389,8 @@ main(int argc, char **argv, char **envp)
|
||||
JS_SetGCParameter(rt, JSGC_MODE, JSGC_MODE_INCREMENTAL);
|
||||
JS_SetGCParameterForThread(cx, JSGC_MAX_CODE_CACHE_BYTES, 16 * 1024 * 1024);
|
||||
|
||||
js::SetPreserveWrapperCallback(rt, DummyPreserveWrapperCallback);
|
||||
|
||||
/* Must be done before creating the global object */
|
||||
if (op.getBoolOption('D'))
|
||||
JS_ToggleOptions(cx, JSOPTION_PCCOUNT);
|
||||
|
Loading…
Reference in New Issue
Block a user