isEvalSource was missing one introduction type, so evaluating
function(){...}
//# sourceURL=blah
in the console would fail -- but wrapping the whole thing in
eval("...") would work.
MozReview-Commit-ID: 13oRnbs1eyF
--HG--
extra : rebase_source : d2360bd3698f4ce20064397aab075d29449dfdcd
In the `enumProperties` function , we can pass some options to only retrieve
indexed or non indexed properties. The problem when doing this is that we were relying
on the value of a `length` property to get what's before (indexed) or after (non-indexed).
But if you have a plain object with a length property like `{length: 789}`,
and try to retrieve non-indexed properties, the function would return an empty ownProperties
object.
In this patch we make extra checks in the function to make sure we do return the expected
data to the client. A unit-test is added to ensure we don't regress.
MozReview-Commit-ID: FMCh9qnzeTT
--HG--
extra : rebase_source : 1adc606a59543ee1849a1311c5e36c1bf9eb6423
Remove the main file that we don't need anymore and modify all
the imports to target the specific file they now need.
MozReview-Commit-ID: 2uWjTnAMAU0
--HG--
extra : rebase_source : ebf75886fac79aaebfab16c03997f402e9f5a278
This patch gently removes support for __exposedProps__ by changing
ExposedPropertiesOnly::check() to always return false, while still
failing silently in deny for some kinds of access.
The tests that I changed all involve testing the behavior with
__exposedProps__. I adjusted them to expect it to fail, or to adjust
the error message they get when they fail. That seemed better than
deleting them entirely.
Note that test_bug1065185.html had a bug, so that it never executed
the first case. I fixed that, and then fixed up the test to work when
__exposedProps__ is not supported.
This also removes various bits of the test framework that use
__exposedProps__, but don't actually need to.
MozReview-Commit-ID: 8fvkAmITmXY
--HG--
extra : rebase_source : ef7e2c55adc12511f17f3865ebb46c343875f0b3
This will enable lazy loading symbols for a grip if needed.
This patch introduce a new SymbolIteratorActor, which is similar
to PropertyIteratorActor but with a data structure that better
fits symbols, and how we already handle them, i.e. an `ownSymbols`
array property (and not an `ownProperties` object like PropertyIteratorActor).
We take this as an opportunity to add a test for enumSymbols, but also
for enumProperties that did not have server unit tests (it is only tested
in the frontend with the variable view, which might be deprecated at some
point).
MozReview-Commit-ID: IEIKA8zwH90
--HG--
extra : rebase_source : 377526321e04e28ffc58ed7af7f4325b6e1ee66d
In prevision of Promise.jsm removal, use defer helper module instead of Promise.jsm
as that's the only one feature that DOM Promise don't support.
PART3: Manual fixes
- Go manually fix: http://searchfox.org/mozilla-central/source/devtools/client/dom/dom-panel.js
which has duplicated import of defer symbol (it already used to import it)
- execute eslint, see all the places where we import of 'promise' is no longer use it
(there may be leftovers not covered by eslint that will be covered in bug 1387128)
devtools/server/tests/mochitest/inspector-helpers.js needs to keep importing promise as it is a shared test script.
- fix devtools/client/performance/panel.js and devtools/client/webconsole/console-output.js
which use loader.lazyRequireGetter(this, "promise") and miss the defer import
- fix devtools/server/worker.js to use 'worker.require(devtools/shared/defer")'
MozReview-Commit-ID: HIOB5Et87Wc
--HG--
extra : rebase_source : fe3bff8599807224fd51898e753589d4c7c1777f
In prevision of Promise.jsm removal, use defer helper module instead of Promise.jsm
as that's the only one feature that DOM Promise don't support.
PART2: Substitutes promise.defer usages with defer
$ sed -i 's/promise.defer/defer/gI' $(egrep -lir "promise.defer\(\)" devtools)
Reset modification to the following files as they are using deprecated syncable promises as we don't want to touch them.
http://searchfox.org/mozilla-central/search?q=deprecated-sync-thenables&case=true®exp=false&path=
$ git checkout devtools/client/debugger/test/mochitest/
$ git checkout devtools/shared/client/main.js
$ git checkout devtools/client/debugger/
$ git checkout devtools/server/main.js
MozReview-Commit-ID: DGN5ae68wtn
--HG--
extra : rebase_source : 57602d89b0bcc1c905bee7723e30f87fa434c6d9
In prevision of Promise.jsm removal, use defer helper module instead of Promise.jsm
as that's the only one feature that DOM Promise don't support.
PART1: Import devtools/shared/defer
$ sed -i '/require("promise")/a const defer = require("devtools/shared/defer");' $(egrep -lir "promise.defer\(\)" $(egrep -rl "require\(\"promise\"\)" devtools))
But ignore debugger as it still uses sync promises and would better be handled manually
$ git checkout devtools/client/debugger/
MozReview-Commit-ID: 7FvhNxULB2x
--HG--
extra : rebase_source : 7eacd673759d85ab88d69b6edc6dff4c7f245638
This changes the parser to use the final token of a statement list as
it's end location. This works around some confusing behavior, such as a
breakpoint firing on the marked line:
<script>
if (1 !== 1) {
console.log("dead code!?"); // set breakpoint here
}
</script>
MozReview-Commit-ID: 3Sk1ERw5Q6z
--HG--
extra : rebase_source : 6c6338ca183518baec6ccfcb9ae17e24cf644c97