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

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

Issue 1730383003: DevTools: consistently use Maybe for optional values in the protocol generator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments addressed Created 4 years, 10 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) 2010-2011 Google Inc. All rights reserved. 2 * Copyright (c) 2010-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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 void V8DebuggerImpl::clearStepping() 371 void V8DebuggerImpl::clearStepping()
372 { 372 {
373 ASSERT(enabled()); 373 ASSERT(enabled());
374 v8::HandleScope scope(m_isolate); 374 v8::HandleScope scope(m_isolate);
375 v8::Context::Scope contextScope(debuggerContext()); 375 v8::Context::Scope contextScope(debuggerContext());
376 376
377 v8::Local<v8::Value> argv[] = { v8::Undefined(m_isolate) }; 377 v8::Local<v8::Value> argv[] = { v8::Undefined(m_isolate) };
378 callDebuggerMethod("clearStepping", 0, argv); 378 callDebuggerMethod("clearStepping", 0, argv);
379 } 379 }
380 380
381 bool V8DebuggerImpl::setScriptSource(const String& sourceID, const String& newCo ntent, bool preview, String* error, OwnPtr<protocol::Debugger::SetScriptSourceEr ror>* errorData, v8::Global<v8::Object>* newCallFrames, OptionalValue<bool>* sta ckChanged) 381 bool V8DebuggerImpl::setScriptSource(const String& sourceID, const String& newCo ntent, bool preview, String* error, Maybe<protocol::Debugger::SetScriptSourceErr or>* errorData, v8::Global<v8::Object>* newCallFrames, Maybe<bool>* stackChanged )
382 { 382 {
383 class EnableLiveEditScope { 383 class EnableLiveEditScope {
384 public: 384 public:
385 explicit EnableLiveEditScope(v8::Isolate* isolate) : m_isolate(isolate) 385 explicit EnableLiveEditScope(v8::Isolate* isolate) : m_isolate(isolate)
386 { 386 {
387 v8::Debug::SetLiveEditEnabled(m_isolate, true); 387 v8::Debug::SetLiveEditEnabled(m_isolate, true);
388 inLiveEditScope = true; 388 inLiveEditScope = true;
389 } 389 }
390 ~EnableLiveEditScope() 390 ~EnableLiveEditScope()
391 { 391 {
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 } 817 }
818 818
819 v8::Local<v8::Context> V8DebuggerImpl::regexContext() 819 v8::Local<v8::Context> V8DebuggerImpl::regexContext()
820 { 820 {
821 if (m_regexContext.IsEmpty()) 821 if (m_regexContext.IsEmpty())
822 m_regexContext.Reset(m_isolate, v8::Context::New(m_isolate)); 822 m_regexContext.Reset(m_isolate, v8::Context::New(m_isolate));
823 return m_regexContext.Get(m_isolate); 823 return m_regexContext.Get(m_isolate);
824 } 824 }
825 825
826 } // namespace blink 826 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698