Merge pull request #11056 from ajmacd/allow-browser-window-logs

Allow BrowserWindows to emit `console-message` events.
This commit is contained in:
Samuel Attard 2017-11-11 14:34:39 +11:00 committed by GitHub
commit a06a8a6f79
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 1 deletions

View file

@ -480,7 +480,7 @@ bool WebContents::DidAddMessageToConsole(content::WebContents* source,
const base::string16& message,
int32_t line_no,
const base::string16& source_id) {
if (type_ == BROWSER_WINDOW || type_ == OFF_SCREEN) {
if (type_ == OFF_SCREEN) {
return false;
} else {
Emit("console-message", level, message, line_no, source_id);