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

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

Issue 2226863003: [DevTools] Reduce API surface of String16. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 if (!message.IsEmpty()) 509 if (!message.IsEmpty())
510 *exceptionDetails = scope.injectedScript()->createExceptionDetails(m essage); 510 *exceptionDetails = scope.injectedScript()->createExceptionDetails(m essage);
511 else 511 else
512 *errorString = "Script compilation failed"; 512 *errorString = "Script compilation failed";
513 return; 513 return;
514 } 514 }
515 515
516 if (!persistScript) 516 if (!persistScript)
517 return; 517 return;
518 518
519 String16 scriptValueId = String16::fromInteger(script->GetUnboundScript()->G etId()); 519 String16 scriptValueId = protocol::string16FromInteger(script->GetUnboundScr ipt()->GetId());
520 std::unique_ptr<v8::Global<v8::Script>> global(new v8::Global<v8::Script>(m_ inspector->isolate(), script)); 520 std::unique_ptr<v8::Global<v8::Script>> global(new v8::Global<v8::Script>(m_ inspector->isolate(), script));
521 m_compiledScripts[scriptValueId] = std::move(global); 521 m_compiledScripts[scriptValueId] = std::move(global);
522 *scriptId = scriptValueId; 522 *scriptId = scriptValueId;
523 } 523 }
524 524
525 void V8RuntimeAgentImpl::runScript( 525 void V8RuntimeAgentImpl::runScript(
526 const String16& scriptId, 526 const String16& scriptId,
527 const Maybe<int>& executionContextId, 527 const Maybe<int>& executionContextId,
528 const Maybe<String16>& objectGroup, 528 const Maybe<String16>& objectGroup,
529 const Maybe<bool>& doNotPauseOnExceptionsAndMuteConsole, 529 const Maybe<bool>& doNotPauseOnExceptionsAndMuteConsole,
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 reportMessage(message, true); 677 reportMessage(message, true);
678 } 678 }
679 679
680 void V8RuntimeAgentImpl::reportMessage(V8ConsoleMessage* message, bool generateP review) 680 void V8RuntimeAgentImpl::reportMessage(V8ConsoleMessage* message, bool generateP review)
681 { 681 {
682 message->reportToFrontend(&m_frontend, m_session, generatePreview); 682 message->reportToFrontend(&m_frontend, m_session, generatePreview);
683 m_frontend.flush(); 683 m_frontend.flush();
684 } 684 }
685 685
686 } // namespace blink 686 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698