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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 108 |
109 /** | 109 /** |
110 * @param {!RuntimeAgent.ExecutionContextDescription} context | 110 * @param {!RuntimeAgent.ExecutionContextDescription} context |
111 */ | 111 */ |
112 _executionContextCreated: function(context) | 112 _executionContextCreated: function(context) |
113 { | 113 { |
114 // The private script context should be hidden behind an experiment. | 114 // The private script context should be hidden behind an experiment. |
115 if (context.name === WebInspector.RuntimeModel._privateScript && !contex
t.origin && !Runtime.experiments.isEnabled("privateScriptInspection")) { | 115 if (context.name === WebInspector.RuntimeModel._privateScript && !contex
t.origin && !Runtime.experiments.isEnabled("privateScriptInspection")) { |
116 return; | 116 return; |
117 } | 117 } |
118 var executionContext = new WebInspector.ExecutionContext(this.target(),
context.id, context.name, context.origin, context.isDefault, context.frameId); | 118 var data = context.auxData || { isDefault: true }; |
| 119 var executionContext = new WebInspector.ExecutionContext(this.target(),
context.id, context.name, context.origin, data["isDefault"], data["frameId"]); |
119 this._executionContextById.set(executionContext.id, executionContext); | 120 this._executionContextById.set(executionContext.id, executionContext); |
120 this.dispatchEventToListeners(WebInspector.RuntimeModel.Events.Execution
ContextCreated, executionContext); | 121 this.dispatchEventToListeners(WebInspector.RuntimeModel.Events.Execution
ContextCreated, executionContext); |
121 }, | 122 }, |
122 | 123 |
123 /** | 124 /** |
124 * @param {number} executionContextId | 125 * @param {number} executionContextId |
125 */ | 126 */ |
126 _executionContextDestroyed: function(executionContextId) | 127 _executionContextDestroyed: function(executionContextId) |
127 { | 128 { |
128 var executionContext = this._executionContextById.get(executionContextId
); | 129 var executionContext = this._executionContextById.get(executionContextId
); |
(...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1012 /** | 1013 /** |
1013 * @return {boolean} | 1014 * @return {boolean} |
1014 */ | 1015 */ |
1015 isNormalListenerType: function() | 1016 isNormalListenerType: function() |
1016 { | 1017 { |
1017 return this._listenerType === "normal"; | 1018 return this._listenerType === "normal"; |
1018 }, | 1019 }, |
1019 | 1020 |
1020 __proto__: WebInspector.SDKObject.prototype | 1021 __proto__: WebInspector.SDKObject.prototype |
1021 } | 1022 } |
OLD | NEW |