OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007-2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2007-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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 v8::HandleScope handleScope; | 373 v8::HandleScope handleScope; |
374 v8::Handle<v8::Function> function = v8::Handle<v8::Function>::Cast(fn); | 374 v8::Handle<v8::Function> function = v8::Handle<v8::Function>::Cast(fn); |
375 *lineNumber = function->GetScriptLineNumber(); | 375 *lineNumber = function->GetScriptLineNumber(); |
376 *columnNumber = function->GetScriptColumnNumber(); | 376 *columnNumber = function->GetScriptColumnNumber(); |
377 if (*lineNumber == v8::Function::kLineOffsetNotFound || *columnNumber == v8:
:Function::kLineOffsetNotFound) | 377 if (*lineNumber == v8::Function::kLineOffsetNotFound || *columnNumber == v8:
:Function::kLineOffsetNotFound) |
378 return false; | 378 return false; |
379 *scriptId = toWebCoreStringWithUndefinedOrNullCheck(function->GetScriptId())
; | 379 *scriptId = toWebCoreStringWithUndefinedOrNullCheck(function->GetScriptId())
; |
380 return true; | 380 return true; |
381 } | 381 } |
382 | 382 |
383 void V8InjectedScriptHost::setBreakpointMethodCustom(const v8::FunctionCallbackI
nfo<v8::Value>& args) | 383 void V8InjectedScriptHost::setDebugBreakpointMethodCustom(const v8::FunctionCall
backInfo<v8::Value>& args) |
384 { | 384 { |
385 String scriptId; | 385 String scriptId; |
386 int lineNumber; | 386 int lineNumber; |
387 int columnNumber; | 387 int columnNumber; |
388 if (!getFunctionLocation(args, &scriptId, &lineNumber, &columnNumber)) | 388 if (!getFunctionLocation(args, &scriptId, &lineNumber, &columnNumber)) |
389 return; | 389 return; |
390 | 390 |
391 InjectedScriptHost* host = V8InjectedScriptHost::toNative(args.Holder()); | 391 InjectedScriptHost* host = V8InjectedScriptHost::toNative(args.Holder()); |
392 host->setBreakpoint(scriptId, lineNumber, columnNumber); | 392 host->setDebugBreakpoint(scriptId, lineNumber, columnNumber); |
393 } | 393 } |
394 | 394 |
395 void V8InjectedScriptHost::removeBreakpointMethodCustom(const v8::FunctionCallba
ckInfo<v8::Value>& args) | 395 void V8InjectedScriptHost::removeDebugBreakpointMethodCustom(const v8::FunctionC
allbackInfo<v8::Value>& args) |
396 { | 396 { |
397 String scriptId; | 397 String scriptId; |
398 int lineNumber; | 398 int lineNumber; |
399 int columnNumber; | 399 int columnNumber; |
400 if (!getFunctionLocation(args, &scriptId, &lineNumber, &columnNumber)) | 400 if (!getFunctionLocation(args, &scriptId, &lineNumber, &columnNumber)) |
401 return; | 401 return; |
402 | 402 |
403 InjectedScriptHost* host = V8InjectedScriptHost::toNative(args.Holder()); | 403 InjectedScriptHost* host = V8InjectedScriptHost::toNative(args.Holder()); |
404 host->removeBreakpoint(scriptId, lineNumber, columnNumber); | 404 host->removeDebugBreakpoint(scriptId, lineNumber, columnNumber); |
405 } | 405 } |
406 | 406 |
| 407 void V8InjectedScriptHost::setMonitorBreakpointMethodCustom(const v8::FunctionCa
llbackInfo<v8::Value>& args) |
| 408 { |
| 409 String scriptId; |
| 410 int lineNumber; |
| 411 int columnNumber; |
| 412 if (args.Length() < 2 || !getFunctionLocation(args, &scriptId, &lineNumber,
&columnNumber)) |
| 413 return; |
| 414 |
| 415 InjectedScriptHost* host = V8InjectedScriptHost::toNative(args.Holder()); |
| 416 host->setMonitorBreakpoint(scriptId, lineNumber, columnNumber, toWebCoreStri
ngWithUndefinedOrNullCheck(args[1])); |
| 417 } |
| 418 |
| 419 void V8InjectedScriptHost::removeMonitorBreakpointMethodCustom(const v8::Functio
nCallbackInfo<v8::Value>& args) |
| 420 { |
| 421 String scriptId; |
| 422 int lineNumber; |
| 423 int columnNumber; |
| 424 if (!getFunctionLocation(args, &scriptId, &lineNumber, &columnNumber)) |
| 425 return; |
| 426 |
| 427 InjectedScriptHost* host = V8InjectedScriptHost::toNative(args.Holder()); |
| 428 host->removeMonitorBreakpoint(scriptId, lineNumber, columnNumber); |
| 429 } |
407 | 430 |
408 } // namespace WebCore | 431 } // namespace WebCore |
409 | 432 |
OLD | NEW |