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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 return ScriptValue(scriptState, v8::Null(isolate)); | 73 return ScriptValue(scriptState, v8::Null(isolate)); |
74 return ScriptValue(scriptState, toV8(node, scriptState->context()->Global(),
isolate)); | 74 return ScriptValue(scriptState, toV8(node, scriptState->context()->Global(),
isolate)); |
75 } | 75 } |
76 | 76 |
77 void V8InjectedScriptHost::inspectedObjectMethodCustom(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 77 void V8InjectedScriptHost::inspectedObjectMethodCustom(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
78 { | 78 { |
79 if (info.Length() < 1) | 79 if (info.Length() < 1) |
80 return; | 80 return; |
81 | 81 |
82 if (!info[0]->IsInt32()) { | 82 if (!info[0]->IsInt32()) { |
83 V8ThrowException::throwTypeError("argument has to be an integer", info.G
etIsolate()); | 83 V8ThrowException::throwTypeError(info.GetIsolate(), "argument has to be
an integer"); |
84 return; | 84 return; |
85 } | 85 } |
86 | 86 |
87 InjectedScriptHost* host = V8InjectedScriptHost::toImpl(info.Holder()); | 87 InjectedScriptHost* host = V8InjectedScriptHost::toImpl(info.Holder()); |
88 InjectedScriptHost::InspectableObject* object = host->inspectedObject(info[0
]->ToInt32()->Value()); | 88 InjectedScriptHost::InspectableObject* object = host->inspectedObject(info[0
]->ToInt32()->Value()); |
89 v8SetReturnValue(info, object->get(ScriptState::current(info.GetIsolate())).
v8Value()); | 89 v8SetReturnValue(info, object->get(ScriptState::current(info.GetIsolate())).
v8Value()); |
90 } | 90 } |
91 | 91 |
92 static v8::Handle<v8::String> functionDisplayName(v8::Handle<v8::Function> funct
ion) | 92 static v8::Handle<v8::String> functionDisplayName(v8::Handle<v8::Function> funct
ion) |
93 { | 93 { |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 void V8InjectedScriptHost::setNonEnumPropertyMethodCustom(const v8::FunctionCall
backInfo<v8::Value>& info) | 501 void V8InjectedScriptHost::setNonEnumPropertyMethodCustom(const v8::FunctionCall
backInfo<v8::Value>& info) |
502 { | 502 { |
503 if (info.Length() < 3 || !info[0]->IsObject() || !info[1]->IsString()) | 503 if (info.Length() < 3 || !info[0]->IsObject() || !info[1]->IsString()) |
504 return; | 504 return; |
505 | 505 |
506 v8::Local<v8::Object> object = info[0]->ToObject(); | 506 v8::Local<v8::Object> object = info[0]->ToObject(); |
507 object->ForceSet(info[1], info[2], v8::DontEnum); | 507 object->ForceSet(info[1], info[2], v8::DontEnum); |
508 } | 508 } |
509 | 509 |
510 } // namespace blink | 510 } // namespace blink |
OLD | NEW |