OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 if (!error) | 374 if (!error) |
375 return; | 375 return; |
376 var warningLevel = WebInspector.Console.MessageLevel.Warning; | 376 var warningLevel = WebInspector.Console.MessageLevel.Warning; |
377 if (!errorData) { | 377 if (!errorData) { |
378 WebInspector.console.addMessage(WebInspector.UIString("LiveEdit
failed: %s", error), warningLevel); | 378 WebInspector.console.addMessage(WebInspector.UIString("LiveEdit
failed: %s", error), warningLevel); |
379 return; | 379 return; |
380 } | 380 } |
381 var compileError = errorData.compileError; | 381 var compileError = errorData.compileError; |
382 if (compileError) { | 382 if (compileError) { |
383 var messageText = WebInspector.UIString("LiveEdit compile failed
: %s", compileError.message); | 383 var messageText = WebInspector.UIString("LiveEdit compile failed
: %s", compileError.message); |
384 this._uiSourceCode.addMessage(WebInspector.UISourceCode.Message.
Level.Error, messageText, compileError.lineNumber - 1, compileError.columnNumber
+ 1); | 384 this._uiSourceCode.addLineMessage(WebInspector.UISourceCode.Mess
age.Level.Error, messageText, compileError.lineNumber - 1, compileError.columnNu
mber + 1); |
385 } else { | 385 } else { |
386 WebInspector.console.addMessage(WebInspector.UIString("Unknown L
iveEdit error: %s; %s", JSON.stringify(errorData), error), warningLevel); | 386 WebInspector.console.addMessage(WebInspector.UIString("Unknown L
iveEdit error: %s; %s", JSON.stringify(errorData), error), warningLevel); |
387 } | 387 } |
388 } | 388 } |
389 }, | 389 }, |
390 | 390 |
391 _update: function() | 391 _update: function() |
392 { | 392 { |
393 if (this._isDiverged() && !this._hasDivergedFromVM) | 393 if (this._isDiverged() && !this._hasDivergedFromVM) |
394 this._divergeFromVM(); | 394 this._divergeFromVM(); |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 */ | 478 */ |
479 addSourceMapURL: function(sourceMapURL) | 479 addSourceMapURL: function(sourceMapURL) |
480 { | 480 { |
481 if (!this._script) | 481 if (!this._script) |
482 return; | 482 return; |
483 this._script.addSourceMapURL(sourceMapURL); | 483 this._script.addSourceMapURL(sourceMapURL); |
484 }, | 484 }, |
485 | 485 |
486 __proto__: WebInspector.Object.prototype | 486 __proto__: WebInspector.Object.prototype |
487 } | 487 } |
OLD | NEW |