1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 01:08:50 +02:00

Always install JX.log, even in production

Summary:
Ref T5366. Currently, enabling `notification.debug` fails to produce any messages unless developer mode is also enabled.

There's no reason we need to disable JX.log in production, and the byte size of the method is very small. Always provide a real JX.log implementation.

Test Plan: Saw notification debugging without needing to enable developer mode.

Reviewers: btrahan, joshuaspence, hach-que

Reviewed By: hach-que

Subscribers: epriestley

Maniphest Tasks: T5366

Differential Revision: https://secure.phabricator.com/D10104
This commit is contained in:
epriestley 2014-07-31 18:38:18 -07:00
parent 8b5192ed71
commit 5cd269609d
2 changed files with 22 additions and 32 deletions

View file

@ -8,7 +8,7 @@
return array(
'names' => array(
'core.pkg.css' => 'cd8c18d3',
'core.pkg.js' => 'ba6a742f',
'core.pkg.js' => 'c3965034',
'darkconsole.pkg.js' => 'df001cab',
'differential.pkg.css' => '4a93db37',
'differential.pkg.js' => '7528cfc9',
@ -172,7 +172,7 @@ return array(
'rsrc/externals/javelin/core/init.js' => 'b88ab49e',
'rsrc/externals/javelin/core/init_node.js' => 'd7dde471',
'rsrc/externals/javelin/core/install.js' => '1ffb3a9c',
'rsrc/externals/javelin/core/util.js' => 'a23de73d',
'rsrc/externals/javelin/core/util.js' => 'e7995242',
'rsrc/externals/javelin/docs/Base.js' => '74676256',
'rsrc/externals/javelin/docs/onload.js' => 'e819c479',
'rsrc/externals/javelin/ext/fx/Color.js' => '7e41274a',
@ -390,7 +390,6 @@ return array(
'rsrc/js/application/doorkeeper/behavior-doorkeeper-tag.js' => 'e5822781',
'rsrc/js/application/files/behavior-icon-composer.js' => '8ef9ab58',
'rsrc/js/application/files/behavior-launch-icon-composer.js' => '48086888',
'rsrc/js/application/harbormaster/behavior-reorder-steps.js' => 'b716477f',
'rsrc/js/application/herald/HeraldRuleEditor.js' => '3fc2c8f2',
'rsrc/js/application/herald/PathTypeahead.js' => 'f7fc67ec',
'rsrc/js/application/herald/herald-rule-editor.js' => '7ebaeed3',
@ -591,7 +590,6 @@ return array(
'javelin-behavior-error-log' => 'a5d7cf86',
'javelin-behavior-fancy-datepicker' => 'a5573bcd',
'javelin-behavior-global-drag-and-drop' => '3672899b',
'javelin-behavior-harbormaster-reorder-steps' => 'b716477f',
'javelin-behavior-herald-rule-editor' => '7ebaeed3',
'javelin-behavior-high-security-warning' => '8fc1c918',
'javelin-behavior-history-install' => '7ee2b591',
@ -689,7 +687,7 @@ return array(
'javelin-typeahead-source' => 'fcba4ecc',
'javelin-typeahead-static-source' => '316b8fa1',
'javelin-uri' => '6eff08aa',
'javelin-util' => 'a23de73d',
'javelin-util' => 'e7995242',
'javelin-vector' => '23cbb8ac',
'javelin-view' => '0f764c35',
'javelin-view-html' => 'e5b406f9',
@ -1620,13 +1618,6 @@ return array(
'javelin-install',
'javelin-util',
),
'b716477f' => array(
'javelin-behavior',
'javelin-stratcom',
'javelin-workflow',
'javelin-dom',
'phabricator-draggable-list',
),
'bba9eedf' => array(
'javelin-behavior',
'javelin-stratcom',

View file

@ -279,28 +279,27 @@ JX.id = function(any) {
};
JX.log = JX.bag;
if (!window.console || !window.console.log) {
if (window.opera && window.opera.postError) {
window.console = {log: function(m) { window.opera.postError(m); }};
} else {
window.console = {log: function(m) { }};
}
}
/**
* Print a message to the browser debugging console (like Firebug).
*
* @param string Message to print to the browser debugging console.
* @return void
*/
JX.log = function(message) {
window.console.log(message);
};
if (__DEV__) {
if (!window.console || !window.console.log) {
if (window.opera && window.opera.postError) {
window.console = {log: function(m) { window.opera.postError(m); }};
} else {
window.console = {log: function(m) { }};
}
}
/**
* Print a message to the browser debugging console (like Firebug). This
* method exists only in ##__DEV__##.
*
* @param string Message to print to the browser debugging console.
* @return void
*/
JX.log = function(message) {
window.console.log(message);
};
window.alert = (function(native_alert) {
var recent_alerts = [];
var in_alert = false;