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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 v8::Handle<v8::Value> functionValue = args[0]; | 324 v8::Handle<v8::Value> functionValue = args[0]; |
325 int scopeIndex = args[1]->Int32Value(); | 325 int scopeIndex = args[1]->Int32Value(); |
326 String variableName = toWebCoreStringWithUndefinedOrNullCheck(args[2]); | 326 String variableName = toWebCoreStringWithUndefinedOrNullCheck(args[2]); |
327 v8::Handle<v8::Value> newValue = args[3]; | 327 v8::Handle<v8::Value> newValue = args[3]; |
328 | 328 |
329 InjectedScriptHost* host = V8InjectedScriptHost::toNative(args.Holder()); | 329 InjectedScriptHost* host = V8InjectedScriptHost::toNative(args.Holder()); |
330 ScriptDebugServer& debugServer = host->scriptDebugServer(); | 330 ScriptDebugServer& debugServer = host->scriptDebugServer(); |
331 return debugServer.setFunctionVariableValue(functionValue, scopeIndex, varia
bleName, newValue); | 331 return debugServer.setFunctionVariableValue(functionValue, scopeIndex, varia
bleName, newValue); |
332 } | 332 } |
333 | 333 |
| 334 v8::Handle<v8::Value> V8InjectedScriptHost::setBreakpointMethodCustom(const v8::
Arguments& args) |
| 335 { |
| 336 InjectedScriptHost* host = V8InjectedScriptHost::toNative(args.Holder()); |
| 337 |
| 338 if (args.Length() < 1) |
| 339 return v8::Undefined(); |
| 340 |
| 341 v8::HandleScope handleScope; |
| 342 |
| 343 v8::Handle<v8::Value> value = args[0]; |
| 344 if (!value->IsFunction()) |
| 345 return v8::Undefined(); |
| 346 v8::Handle<v8::Function> function = v8::Handle<v8::Function>::Cast(value); |
| 347 v8::Handle<v8::String> scriptId = function->GetScriptId()->ToString(); |
| 348 |
| 349 host->setBreakpoint(v8StringToWebCoreString<String>(scriptId, Externalize),
function->GetScriptLineNumber(), function->GetScriptColumnNumber()); |
| 350 |
| 351 return v8::Undefined(); |
| 352 } |
| 353 |
334 | 354 |
335 } // namespace WebCore | 355 } // namespace WebCore |
336 | 356 |
OLD | NEW |