Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 requireNative("runtime"); | |
|
Mihai Parparita -not on Chrome
2012/07/10 20:02:08
Nit: should use single quotes.
asargent_no_longer_on_chrome
2012/07/10 20:11:13
Done.
| |
| 6 | |
| 5 function set(message) { | 7 function set(message) { |
| 6 var errorObject = { "message": message }; | 8 var errorObject = { "message": message }; |
| 7 if (chrome.extension) | 9 if (chrome.extension) |
| 8 chrome.extension.lastError = errorObject; | 10 chrome.extension.lastError = errorObject; |
| 9 chrome.runtime.lastError = errorObject; | 11 chrome.runtime.lastError = errorObject; |
| 10 }; | 12 }; |
| 11 | 13 |
| 12 function clear() { | 14 function clear() { |
| 13 if (chrome.extension) | 15 if (chrome.extension) |
| 14 delete chrome.extension.lastError; | 16 delete chrome.extension.lastError; |
| 15 delete chrome.runtime.lastError; | 17 delete chrome.runtime.lastError; |
| 16 }; | 18 }; |
| 17 | 19 |
| 18 exports.clear = clear; | 20 exports.clear = clear; |
| 19 exports.set = set; | 21 exports.set = set; |
| OLD | NEW |