| 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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 | 352 |
| 353 void V8InjectedScriptHost::inspectMethodCustom(const v8::FunctionCallbackInfo<v8
::Value>& info) | 353 void V8InjectedScriptHost::inspectMethodCustom(const v8::FunctionCallbackInfo<v8
::Value>& info) |
| 354 { | 354 { |
| 355 if (info.Length() < 2) | 355 if (info.Length() < 2) |
| 356 return; | 356 return; |
| 357 | 357 |
| 358 InjectedScriptHost* host = V8InjectedScriptHost::toImpl(info.Holder()); | 358 InjectedScriptHost* host = V8InjectedScriptHost::toImpl(info.Holder()); |
| 359 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 359 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 360 ScriptValue object(scriptState, info[0]); | 360 ScriptValue object(scriptState, info[0]); |
| 361 ScriptValue hints(scriptState, info[1]); | 361 ScriptValue hints(scriptState, info[1]); |
| 362 host->inspectImpl(object.toJSONValue(scriptState), hints.toJSONValue(scriptS
tate)); | 362 host->inspectImpl(toJSONValue(object), toJSONValue(hints)); |
| 363 } | 363 } |
| 364 | 364 |
| 365 void V8InjectedScriptHost::evalMethodCustom(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 365 void V8InjectedScriptHost::evalMethodCustom(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 366 { | 366 { |
| 367 v8::Isolate* isolate = info.GetIsolate(); | 367 v8::Isolate* isolate = info.GetIsolate(); |
| 368 if (info.Length() < 1) { | 368 if (info.Length() < 1) { |
| 369 isolate->ThrowException(v8::Exception::Error(v8::String::NewFromUtf8(iso
late, "One argument expected."))); | 369 isolate->ThrowException(v8::Exception::Error(v8::String::NewFromUtf8(iso
late, "One argument expected."))); |
| 370 return; | 370 return; |
| 371 } | 371 } |
| 372 | 372 |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 InjectedScriptNative* injectedScriptNative = InjectedScriptNative::fromInjec
tedScriptHost(info.Holder()); | 598 InjectedScriptNative* injectedScriptNative = InjectedScriptNative::fromInjec
tedScriptHost(info.Holder()); |
| 599 if (!injectedScriptNative) | 599 if (!injectedScriptNative) |
| 600 return; | 600 return; |
| 601 int id = info[0]->ToInt32(info.GetIsolate())->Value(); | 601 int id = info[0]->ToInt32(info.GetIsolate())->Value(); |
| 602 String groupName = injectedScriptNative->groupName(id); | 602 String groupName = injectedScriptNative->groupName(id); |
| 603 if (!groupName.isEmpty()) | 603 if (!groupName.isEmpty()) |
| 604 info.GetReturnValue().Set(v8String(info.GetIsolate(), groupName)); | 604 info.GetReturnValue().Set(v8String(info.GetIsolate(), groupName)); |
| 605 } | 605 } |
| 606 | 606 |
| 607 } // namespace blink | 607 } // namespace blink |
| OLD | NEW |