Closed Bug 1504207 Opened 4 years ago Closed 4 years ago

Add Prefs for allowing usage of eval with system principal in test files

Categories

(Core :: DOM: Security, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: vinoth, Assigned: vinoth)

References

(Blocks 1 open bug)

Details

(Whiteboard: [domsecurity-active])

Attachments

(1 file)

In a few test cases, we use eval(), new Function. Usage of eval() or new Function() will trigger Assertion in nsScriptSecurityManager. Hence we are adding prefs to these test files for toggling the assertion.

Prefs are added for 39 test files,

1. devtools/client/storage/test/browser_storage_cookies_hostOnly.js
2. devtools/server/tests/unit/test_eval-01.js
3. devtools/server/tests/unit/test_eval-02.js
4. devtools/server/tests/unit/test_eval-03.js
5. devtools/server/tests/unit/test_eval-04.js
6. devtools/server/tests/unit/test_eval-05.js
7. devtools/server/tests/unit/test_frameactor-01.js
8. devtools/server/tests/unit/test_frameactor-02.js
9. devtools/server/tests/unit/test_frameactor-03.js
10. devtools/server/tests/unit/test_frameactor-04.js
11. devtools/server/tests/unit/test_frameactor-05.js
12. devtools/server/tests/unit/test_frameactor_wasm-01.js
13. devtools/server/tests/unit/test_framearguments-01.js
14. devtools/server/tests/unit/test_frameclient-01.js
15. devtools/server/tests/unit/test_frameclient-02.js
16. devtools/server/tests/unit/test_functiongrips-01.js
17. devtools/server/tests/unit/test_getyoungestframe.js
18. devtools/server/tests/unit/test_listsources-03.js
19. devtools/server/tests/unit/test_nativewrappers.js
20. devtools/server/tests/unit/test_new_source-02.js
21. devtools/server/tests/unit/test_objectgrips-01.js
22. devtools/server/tests/unit/test_objectgrips-02.js
23. devtools/server/tests/unit/test_objectgrips-03.js
24. devtools/server/tests/unit/test_pauselifetime-01.js
25. devtools/server/tests/unit/test_pauselifetime-02.js
26. devtools/server/tests/unit/test_pauselifetime-03.js
27. devtools/server/tests/unit/test_pauselifetime-04.js
28. devtools/server/tests/unit/test_sourcemaps-03.js
29. devtools/server/tests/unit/test_sourcemaps-17.js
30. devtools/server/tests/unit/test_threadlifetime-01.js
31. devtools/server/tests/unit/test_threadlifetime-02.js
32. devtools/server/tests/unit/test_threadlifetime-03.js
33. devtools/server/tests/unit/test_threadlifetime-04.js
34. devtools/server/tests/unit/test_threadlifetime-05.js
35. devtools/server/tests/unit/test_threadlifetime-06.js
36. js/xpconnect/tests/chrome/test_bug596580.xul
37. js/xpconnect/tests/chrome/test_windowProxyDeadWrapper.html
38. toolkit/components/passwordmgr/test/mochitest/test_autocomplete_sandboxed.html
39. toolkit/components/passwordmgr/test/mochitest/test_autofocus_js.html
Comment on attachment 9022140 [details]
Bug 1504207 - Add Prefs for allowing usage of eval with system principal in test files

Please kindly review the patch and let me know if changes are needed.

Corresponding TRY push for this patch,
https://treeherder.mozilla.org/#/jobs?repo=try&revision=03dd179bf97461d034c5bc53e7b943a414031bed
Attachment #9022140 - Flags: review?(ckerschb)
Priority: P3 → P2
Whiteboard: [domsecurity-active]
Comment on attachment 9022140 [details]
Bug 1504207 - Add Prefs for allowing usage of eval with system principal in test files

that looks good to me - thanks!
Attachment #9022140 - Flags: review?(ckerschb) → review+
Keywords: checkin-needed
Pushed by aiakab@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bbfa16d20c2d
Add Prefs for allowing usage of eval with system principal in test files r=ckerschb
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/bbfa16d20c2d
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in before you can comment on or make changes to this bug.