OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 20 matching lines...) Expand all Loading... | |
31 * @param {InjectedScriptHost} InjectedScriptHost | 31 * @param {InjectedScriptHost} InjectedScriptHost |
32 * @param {Window} inspectedWindow | 32 * @param {Window} inspectedWindow |
33 * @param {number} injectedScriptId | 33 * @param {number} injectedScriptId |
34 */ | 34 */ |
35 (function (InjectedScriptHost, inspectedWindow, injectedScriptId) { | 35 (function (InjectedScriptHost, inspectedWindow, injectedScriptId) { |
36 | 36 |
37 /** | 37 /** |
38 * Protect against Object overwritten by the user code. | 38 * Protect against Object overwritten by the user code. |
39 * @suppress {duplicate} | 39 * @suppress {duplicate} |
40 */ | 40 */ |
41 var Object = /** @type {function(new:Object, *=)} */ ({}.constructor); | 41 self.Object = /** @type {function(new:Object, *=)} */ ({}.constructor); |
aandrey
2014/06/16 18:22:07
how is it supposed to work?
apavlov
2014/06/16 19:12:19
See http://www.ecma-international.org/ecma-262/5.1
aandrey
2014/06/16 19:44:47
This is not top level. Setting "Object" property o
apavlov
2014/06/17 11:28:14
Fixed (it used to be top-level when compiling, tha
| |
42 | 42 |
43 /** | 43 /** |
44 * @param {!Array.<T>} array | 44 * @param {!Array.<T>} array |
45 * @param {...} var_args | 45 * @param {...} var_args |
46 * @template T | 46 * @template T |
47 */ | 47 */ |
48 function push(array, var_args) | 48 function push(array, var_args) |
49 { | 49 { |
50 for (var i = 1; i < arguments.length; ++i) | 50 for (var i = 1; i < arguments.length; ++i) |
51 array[array.length] = arguments[i]; | 51 array[array.length] = arguments[i]; |
(...skipping 1647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1699 */ | 1699 */ |
1700 _logEvent: function(event) | 1700 _logEvent: function(event) |
1701 { | 1701 { |
1702 inspectedWindow.console.log(event.type, event); | 1702 inspectedWindow.console.log(event.type, event); |
1703 } | 1703 } |
1704 } | 1704 } |
1705 | 1705 |
1706 injectedScript._commandLineAPIImpl = new CommandLineAPIImpl(); | 1706 injectedScript._commandLineAPIImpl = new CommandLineAPIImpl(); |
1707 return injectedScript; | 1707 return injectedScript; |
1708 }) | 1708 }) |
OLD | NEW |