Skip to content
This repository has been archived by the owner on Feb 26, 2022. It is now read-only.

Commit

Permalink
Merge pull request #904 from ochameau/bug855354
Browse files Browse the repository at this point in the history
Bug 855354: Stop using chrome console object in content script API implementation. r=@Mossop
  • Loading branch information
ochameau committed Mar 28, 2013
2 parents 8f630e9 + eaaf4ce commit 2354c29
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/sdk/content/content-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ const ContentWorker = Object.freeze({
});
},

injectMessageAPI: function injectMessageAPI(exports, pipe) {
injectMessageAPI: function injectMessageAPI(exports, pipe, console) {

let { eventEmitter: port, emit : portEmit } =
ContentWorker.createEventEmitter(pipe.emit.bind(null, "event"));
Expand Down Expand Up @@ -293,7 +293,7 @@ const ContentWorker = Object.freeze({

ContentWorker.injectConsole(exports, pipe);
ContentWorker.injectTimers(exports, chromeAPI, pipe, exports.console);
ContentWorker.injectMessageAPI(exports, pipe);
ContentWorker.injectMessageAPI(exports, pipe, exports.console);
if ( options !== undefined ) {
ContentWorker.injectOptions(exports, options);
}
Expand Down
6 changes: 5 additions & 1 deletion lib/sdk/test/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ exports.LoaderWithHookedConsole = function (module, callback) {
warn: hook.bind("warn"),
error: hook.bind("error"),
debug: hook.bind("debug"),
exception: hook.bind("exception")
exception: hook.bind("exception"),
__exposedProps__: {
log: "rw", info: "rw", warn: "rw", error: "rw", debug: "rw",
exception: "rw"
}
}
}),
messages: messages
Expand Down

0 comments on commit 2354c29

Please sign in to comment.