Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Side by Side Diff: test/inspector/console/destroy-context-during-log.js

Issue 2432163004: Avoid using stale InspectedContext pointers (Closed)
Patch Set: Fix nits Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 const expression = `
6 Object.defineProperty(Object.prototype, 'RemoteObject', {
7 configurable: true,
8 set(v) {
9 delete Object.prototype.RemoteObject;
10 this.RemoteObject = v;
11
12 detachInspector();
13 setTimeout(function() {
14 // Attach the inspector again for the sake of establishing a
15 // communication channel with the frontend test runner.
16 attachInspector();
17 console.log("End of test");
18 }, 0);
19 },
20 });
21
22 // Before the whole script runs, the inspector is already attached.
23 // Re-attach the inspector and trigger the console API to make sure that the
24 // injected inspector script runs again (and triggers the above setter).
25 detachInspector();
26 attachInspector();
27 console.log("First inspector activity after attaching inspector");
28 `;
29
30 Protocol.Runtime.enable();
31 Protocol.Runtime.evaluate({ expression: expression });
32
33 Protocol.Runtime.onConsoleAPICalled(function(result) {
34 InspectorTest.logObject(result.params.args[0]);
35 if (result.params.args[0].value == "End of test") {
36 InspectorTest.completeTest();
37 }
38 });
OLDNEW
« no previous file with comments | « src/inspector/v8-inspector-session-impl.cc ('k') | test/inspector/console/destroy-context-during-log-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698