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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 | 409 |
410 static ScriptDebugServer* toScriptDebugServer(v8::Handle<v8::Value> data) | 410 static ScriptDebugServer* toScriptDebugServer(v8::Handle<v8::Value> data) |
411 { | 411 { |
412 void* p = v8::Handle<v8::External>::Cast(data)->Value(); | 412 void* p = v8::Handle<v8::External>::Cast(data)->Value(); |
413 return static_cast<ScriptDebugServer*>(p); | 413 return static_cast<ScriptDebugServer*>(p); |
414 } | 414 } |
415 | 415 |
416 void ScriptDebugServer::breakProgramCallback(const v8::FunctionCallbackInfo<v8::
Value>& args) | 416 void ScriptDebugServer::breakProgramCallback(const v8::FunctionCallbackInfo<v8::
Value>& args) |
417 { | 417 { |
418 ASSERT(2 == args.Length()); | 418 ASSERT(2 == args.Length()); |
419 | 419 |
420 ScriptDebugServer* thisPtr = toScriptDebugServer(args.Data()); | 420 ScriptDebugServer* thisPtr = toScriptDebugServer(args.Data()); |
421 v8::Handle<v8::Value> exception; | 421 v8::Handle<v8::Value> exception; |
422 v8::Handle<v8::Array> hitBreakpoints; | 422 v8::Handle<v8::Array> hitBreakpoints; |
423 thisPtr->handleProgramBreak(v8::Handle<v8::Object>::Cast(args[0]), exception
, hitBreakpoints); | 423 thisPtr->handleProgramBreak(v8::Handle<v8::Object>::Cast(args[0]), exception
, hitBreakpoints); |
424 } | 424 } |
425 | 425 |
426 void ScriptDebugServer::handleProgramBreak(v8::Handle<v8::Object> executionState
, v8::Handle<v8::Value> exception, v8::Handle<v8::Array> hitBreakpointNumbers) | 426 void ScriptDebugServer::handleProgramBreak(v8::Handle<v8::Object> executionState
, v8::Handle<v8::Value> exception, v8::Handle<v8::Array> hitBreakpointNumbers) |
427 { | 427 { |
428 // Don't allow nested breaks. | 428 // Don't allow nested breaks. |
429 if (isPaused()) | 429 if (isPaused()) |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
657 *wasThrown = true; | 657 *wasThrown = true; |
658 *result = ScriptValue(tryCatch.Exception()); | 658 *result = ScriptValue(tryCatch.Exception()); |
659 v8::Local<v8::Message> message = tryCatch.Message(); | 659 v8::Local<v8::Message> message = tryCatch.Message(); |
660 if (!message.IsEmpty()) | 660 if (!message.IsEmpty()) |
661 *exceptionMessage = toWebCoreStringWithUndefinedOrNullCheck(message-
>Get()); | 661 *exceptionMessage = toWebCoreStringWithUndefinedOrNullCheck(message-
>Get()); |
662 } else | 662 } else |
663 *result = ScriptValue(value); | 663 *result = ScriptValue(value); |
664 } | 664 } |
665 | 665 |
666 } // namespace WebCore | 666 } // namespace WebCore |
OLD | NEW |