Closed
Bug 992560
Opened 11 years ago
Closed 11 years ago
Make console.time available to content scripts
Categories
(Add-on SDK Graveyard :: General, defect)
Add-on SDK Graveyard
General
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla31
People
(Reporter: anaran, Assigned: anaran)
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Firefox/31.0 (Beta/Release)
Build ID: 20140404030202
Steps to reproduce:
Add
// Begin of content script
console.time('loading...');
// Code of content script goes here...
// End of content script
console.timeEnd('loading...');
Actual results:
console.error: snapper:
Message: TypeError: console.time is not a function
Stack:
@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///c:/cygwin/tmp/tmpol8sai.mozrunner/extensions/jid1-HE38Y6vsW9TpHg@jetpack.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/loader/sandbox.js -> resource://jid1-he38y6vsw9tphg-at-jetpack/snapper/data/display.js:12:9
@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///c:/cygwin/tmp/tmpol8sai.mozrunner/extensions/jid1-HE38Y6vsW9TpHg@jetpack.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/loader/sandbox.js -> resource://jid1-he38y6vsw9tphg-at-jetpack/snapper/data/display.js:7:2
Expected results:
console.time(name) and console.timeEnd(name) should be available in content scripts like they already are in the addon main module.
I already sent a tested pull request to
https://github.com/mozilla/addon-sdk/pull/1454
Assignee | ||
Comment 1•11 years ago
|
||
Attachment #8402219 -
Flags: review?
Assignee | ||
Updated•11 years ago
|
Attachment #8402219 -
Flags: review? → review?(tomica+amo)
Updated•11 years ago
|
Assignee: nobody → adrian
Status: UNCONFIRMED → ASSIGNED
No longer depends on: 641463
Ever confirmed: true
Comment 2•11 years ago
|
||
Comment on attachment 8402219 [details] [review]
Pull Request
the tests don't pass, and it looks like this wouldn't work even with updated tests. i couldn't understand why with a quick look through the code, so you might need to investigate a bit deeper.
Attachment #8402219 -
Flags: review?(tomica+amo) → review-
Comment 3•11 years ago
|
||
yeah, my hunch was right, it's a problem with our LoaderWithHookedConsole mock, see here:
https://github.com/mozilla/addon-sdk/blob/master/lib/sdk/test/loader.js#L64
Comment 4•11 years ago
|
||
Comment on attachment 8402219 [details] [review]
Pull Request
good work Adrian, thank you for your effort.. (and tenacity ;)
if you would like to continue contributing, check out these "good first bugs":
https://bugzilla.mozilla.org/buglist.cgi?cmdtype=runnamed&namedcmd=sdk1st
Attachment #8402219 -
Flags: review- → review+
Comment 5•11 years ago
|
||
Commits pushed to master at https://github.com/mozilla/addon-sdk
https://github.com/mozilla/addon-sdk/commit/fd052efb773691fc7c35ffe1d3d57d70a3de82c3
Bug 992560 - Make console.time available to content scripts
https://github.com/mozilla/addon-sdk/commit/594db92090d870e3b426851d0cc6d80201d72d45
Merge pull request #1454 from anaran/master
Bug 992560 - Make console.time available to content scripts, r=@zombie
Updated•11 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Assignee | ||
Comment 6•11 years ago
|
||
(In reply to Tomislav Jovanovic [:zombie] from comment #4)
> Comment on attachment 8402219 [details] [review]
> Pull Request
>
> good work Adrian, thank you for your effort.. (and tenacity ;)
It's great to see this change go in!
>
> if you would like to continue contributing, check out these "good first
> bugs":
>
> https://bugzilla.mozilla.org/buglist.cgi?cmdtype=runnamed&namedcmd=sdk1st
The search named sdk1st does not exist.
Assignee | ||
Comment 7•11 years ago
|
||
(In reply to Tomislav Jovanovic [:zombie] from comment #4)
> Comment on attachment 8402219 [details] [review]
> Pull Request
>
> good work Adrian, thank you for your effort.. (and tenacity ;)
>
> if you would like to continue contributing, check out these "good first
> bugs":
>
> https://bugzilla.mozilla.org/buglist.cgi?cmdtype=runnamed&namedcmd=sdk1st
That one, taken from https://github.com/mozilla/addon-sdk/wiki/contribute, works fine:
https://bugzilla.mozilla.org/buglist.cgi?columnlist=bug_severity%2Cpriority%2Cassigned_to%2Cbug_status%2Ctarget_milestone%2Cresolution%2Cshort_desc%2Cchangeddate&query_based_on=jetpack-good-1st-bugs&status_whiteboard_type=allwordssubstr&query_format=advanced&status_whiteboard=[good%20first%20bug]&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=VERIFIED&product=Add-on%20SDK&known_name=jetpack-good-1st-bugs&list_id=9876827
You need to log in
before you can comment on or make changes to this bug.
Description
•