OLD | NEW |
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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 ScriptState* currentCallFrameState = ScriptState::forContext(m_pausedContext
); | 386 ScriptState* currentCallFrameState = ScriptState::forContext(m_pausedContext
); |
387 listener->didPause(currentCallFrameState, currentCallFrame(), ScriptValue(ex
ception, currentCallFrameState->isolate()), breakpointIds); | 387 listener->didPause(currentCallFrameState, currentCallFrame(), ScriptValue(ex
ception, currentCallFrameState->isolate()), breakpointIds); |
388 | 388 |
389 m_runningNestedMessageLoop = true; | 389 m_runningNestedMessageLoop = true; |
390 runMessageLoopOnPause(m_pausedContext); | 390 runMessageLoopOnPause(m_pausedContext); |
391 m_runningNestedMessageLoop = false; | 391 m_runningNestedMessageLoop = false; |
392 } | 392 } |
393 | 393 |
394 void ScriptDebugServer::handleProgramBreak(const v8::Debug::EventDetails& eventD
etails, v8::Handle<v8::Value> exception, v8::Handle<v8::Array> hitBreakpointNumb
ers) | 394 void ScriptDebugServer::handleProgramBreak(const v8::Debug::EventDetails& eventD
etails, v8::Handle<v8::Value> exception, v8::Handle<v8::Array> hitBreakpointNumb
ers) |
395 { | 395 { |
| 396 // FIXME(http://dartbug.com/14802): The check in the function above appears
to be insufficient as |
| 397 // m_pausedContext is cleared for current invocations of handleProgramBreak. |
| 398 // Don't allow nested breaks. |
| 399 if (isPaused()) |
| 400 return; |
| 401 |
396 m_pausedContext = eventDetails.GetEventContext(); | 402 m_pausedContext = eventDetails.GetEventContext(); |
397 handleProgramBreak(eventDetails.GetExecutionState(), exception, hitBreakpoin
tNumbers); | 403 handleProgramBreak(eventDetails.GetExecutionState(), exception, hitBreakpoin
tNumbers); |
398 m_pausedContext.Clear(); | 404 m_pausedContext.Clear(); |
399 } | 405 } |
400 | 406 |
401 void ScriptDebugServer::v8DebugEventCallback(const v8::Debug::EventDetails& even
tDetails) | 407 void ScriptDebugServer::v8DebugEventCallback(const v8::Debug::EventDetails& even
tDetails) |
402 { | 408 { |
403 ScriptDebugServer* thisPtr = toScriptDebugServer(eventDetails.GetCallbackDat
a()); | 409 ScriptDebugServer* thisPtr = toScriptDebugServer(eventDetails.GetCallbackDat
a()); |
404 thisPtr->handleV8DebugEvent(eventDetails); | 410 thisPtr->handleV8DebugEvent(eventDetails); |
405 } | 411 } |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
633 { | 639 { |
634 return PassOwnPtr<ScriptSourceCode>(); | 640 return PassOwnPtr<ScriptSourceCode>(); |
635 } | 641 } |
636 | 642 |
637 String ScriptDebugServer::preprocessEventListener(Frame*, const String& source,
const String& url, const String& functionName) | 643 String ScriptDebugServer::preprocessEventListener(Frame*, const String& source,
const String& url, const String& functionName) |
638 { | 644 { |
639 return source; | 645 return source; |
640 } | 646 } |
641 | 647 |
642 } // namespace WebCore | 648 } // namespace WebCore |
OLD | NEW |