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

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

Issue 1702673002: DevTools: migrate remote debugging protocol generators to jinja2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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, RefPtr<protocol::TypeBuilder::Debugger::SetS criptSourceError>& errorData, v8::Global<v8::Object>* newCallFrames, protocol::T ypeBuilder::OptOutput<bool>* stackChanged) 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)
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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 { 429 {
430 *stackChanged = resultTuple->Get(1)->BooleanValue(); 430 *stackChanged = resultTuple->Get(1)->BooleanValue();
431 // Call stack may have changed after if the edited function was on t he stack. 431 // Call stack may have changed after if the edited function was on t he stack.
432 if (!preview && isPaused()) 432 if (!preview && isPaused())
433 newCallFrames->Reset(m_isolate, currentCallFrames()); 433 newCallFrames->Reset(m_isolate, currentCallFrames());
434 return true; 434 return true;
435 } 435 }
436 // Compile error. 436 // Compile error.
437 case 1: 437 case 1:
438 { 438 {
439 errorData = protocol::TypeBuilder::Debugger::SetScriptSourceError::c reate() 439 *errorData = protocol::Debugger::SetScriptSourceError::create()
440 .setMessage(toWTFStringWithTypeCheck(resultTuple->Get(2))) 440 .setMessage(toWTFStringWithTypeCheck(resultTuple->Get(2)))
441 .setLineNumber(resultTuple->Get(3)->ToInteger(m_isolate)->Va lue()) 441 .setLineNumber(resultTuple->Get(3)->ToInteger(m_isolate)->Va lue())
442 .setColumnNumber(resultTuple->Get(4)->ToInteger(m_isolate)-> Value()); 442 .setColumnNumber(resultTuple->Get(4)->ToInteger(m_isolate)-> Value()).build();
443 return false; 443 return false;
444 } 444 }
445 } 445 }
446 *error = "Unknown error."; 446 *error = "Unknown error.";
447 return false; 447 return false;
448 } 448 }
449 449
450 int V8DebuggerImpl::frameCount() 450 int V8DebuggerImpl::frameCount()
451 { 451 {
452 ASSERT(isPaused()); 452 ASSERT(isPaused());
(...skipping 364 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