author | Mike Taylor <miket@mozilla.com> |
Mon, 27 Oct 2014 11:19:00 +0100 | |
changeset 212553 | 9d42e896570c1b5494f29846a20c5ab097b5b112 |
parent 212552 | 4651f5f4e29b2a0cadc6be1979646ec48ed59e4c |
child 212554 | a2d58c6420f41a1a57d2e6b688d6a7a07a27810e |
child 212648 | e661e86180ea014bfdb6bc03ce00c1c73ff9dd8f |
push id | 27720 |
push user | cbook@mozilla.com |
push date | Tue, 28 Oct 2014 14:51:21 +0000 |
treeherder | mozilla-central@a2d58c6420f4 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | margaret |
bugs | 1089376 |
milestone | 36.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/mobile/android/chrome/content/WebcompatReporter.js +++ b/mobile/android/chrome/content/WebcompatReporter.js @@ -1,14 +1,15 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ const { classes: Cc, interfaces: Ci, utils: Cu } = Components; +Cu.import("resource://gre/modules/PrivateBrowsingUtils.jsm"); Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/XPCOMUtils.jsm"); var WebcompatReporter = { menuItem: null, menuItemEnabled: null, init: function() { Services.obs.addObserver(this, "DesktopMode:Change", false); @@ -73,15 +74,19 @@ var WebcompatReporter = { }; NativeWindow.toast.show(message, "long", options); }, reportIssue: function(url) { let webcompatURL = new URL("http://webcompat.com/"); webcompatURL.searchParams.append("open", "1"); webcompatURL.searchParams.append("url", url); - BrowserApp.addTab(webcompatURL.href); + if (PrivateBrowsingUtils.isBrowserPrivate(BrowserApp.selectedTab.browser)) { + BrowserApp.addTab(webcompatURL.href, {parentId: BrowserApp.selectedTab.id, isPrivate: true}); + } else { + BrowserApp.addTab(webcompatURL.href); + } } }; XPCOMUtils.defineLazyGetter(WebcompatReporter, "strings", function() { return Services.strings.createBundle("chrome://browser/locale/webcompatReporter.properties"); });