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

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp

Issue 2219393003: DevTools: Runtime.compileScript with persistScript = false should not report script (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 4 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
« no previous file with comments | « third_party/WebKit/Source/platform/v8_inspector/V8Debugger.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 19 matching lines...) Expand all
30 30
31 #include "platform/v8_inspector/V8RuntimeAgentImpl.h" 31 #include "platform/v8_inspector/V8RuntimeAgentImpl.h"
32 32
33 #include "platform/inspector_protocol/Parser.h" 33 #include "platform/inspector_protocol/Parser.h"
34 #include "platform/inspector_protocol/Values.h" 34 #include "platform/inspector_protocol/Values.h"
35 #include "platform/v8_inspector/InjectedScript.h" 35 #include "platform/v8_inspector/InjectedScript.h"
36 #include "platform/v8_inspector/InspectedContext.h" 36 #include "platform/v8_inspector/InspectedContext.h"
37 #include "platform/v8_inspector/RemoteObjectId.h" 37 #include "platform/v8_inspector/RemoteObjectId.h"
38 #include "platform/v8_inspector/V8ConsoleMessage.h" 38 #include "platform/v8_inspector/V8ConsoleMessage.h"
39 #include "platform/v8_inspector/V8Debugger.h" 39 #include "platform/v8_inspector/V8Debugger.h"
40 #include "platform/v8_inspector/V8DebuggerAgentImpl.h"
40 #include "platform/v8_inspector/V8InspectorImpl.h" 41 #include "platform/v8_inspector/V8InspectorImpl.h"
41 #include "platform/v8_inspector/V8InspectorSessionImpl.h" 42 #include "platform/v8_inspector/V8InspectorSessionImpl.h"
42 #include "platform/v8_inspector/V8StackTraceImpl.h" 43 #include "platform/v8_inspector/V8StackTraceImpl.h"
43 #include "platform/v8_inspector/V8StringUtil.h" 44 #include "platform/v8_inspector/V8StringUtil.h"
44 #include "platform/v8_inspector/public/V8InspectorClient.h" 45 #include "platform/v8_inspector/public/V8InspectorClient.h"
45 46
46 namespace blink { 47 namespace blink {
47 48
48 namespace V8RuntimeAgentImplState { 49 namespace V8RuntimeAgentImplState {
49 static const char customObjectFormatterEnabled[] = "customObjectFormatterEnabled "; 50 static const char customObjectFormatterEnabled[] = "customObjectFormatterEnabled ";
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 *errorString = "Runtime agent is not enabled"; 497 *errorString = "Runtime agent is not enabled";
497 return; 498 return;
498 } 499 }
499 int contextId = ensureContext(errorString, m_inspector, m_session->contextGr oupId(), executionContextId); 500 int contextId = ensureContext(errorString, m_inspector, m_session->contextGr oupId(), executionContextId);
500 if (!errorString->isEmpty()) 501 if (!errorString->isEmpty())
501 return; 502 return;
502 InjectedScript::ContextScope scope(errorString, m_inspector, m_session->cont extGroupId(), contextId); 503 InjectedScript::ContextScope scope(errorString, m_inspector, m_session->cont extGroupId(), contextId);
503 if (!scope.initialize()) 504 if (!scope.initialize())
504 return; 505 return;
505 506
507 if (!persistScript)
508 m_inspector->debugger()->muteScriptParsedEvents();
506 v8::Local<v8::Script> script = m_inspector->compileScript(scope.context(), t oV8String(m_inspector->isolate(), expression), sourceURL, false); 509 v8::Local<v8::Script> script = m_inspector->compileScript(scope.context(), t oV8String(m_inspector->isolate(), expression), sourceURL, false);
510 if (!persistScript)
511 m_inspector->debugger()->unmuteScriptParsedEvents();
507 if (script.IsEmpty()) { 512 if (script.IsEmpty()) {
508 v8::Local<v8::Message> message = scope.tryCatch().Message(); 513 v8::Local<v8::Message> message = scope.tryCatch().Message();
509 if (!message.IsEmpty()) 514 if (!message.IsEmpty())
510 *exceptionDetails = scope.injectedScript()->createExceptionDetails(m essage); 515 *exceptionDetails = scope.injectedScript()->createExceptionDetails(m essage);
511 else 516 else
512 *errorString = "Script compilation failed"; 517 *errorString = "Script compilation failed";
513 return; 518 return;
514 } 519 }
515 520
516 if (!persistScript) 521 if (!persistScript)
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 reportMessage(message, true); 682 reportMessage(message, true);
678 } 683 }
679 684
680 void V8RuntimeAgentImpl::reportMessage(V8ConsoleMessage* message, bool generateP review) 685 void V8RuntimeAgentImpl::reportMessage(V8ConsoleMessage* message, bool generateP review)
681 { 686 {
682 message->reportToFrontend(&m_frontend, m_session, generatePreview); 687 message->reportToFrontend(&m_frontend, m_session, generatePreview);
683 m_frontend.flush(); 688 m_frontend.flush();
684 } 689 }
685 690
686 } // namespace blink 691 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/v8_inspector/V8Debugger.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698