| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 #include "V8Uint32Array.h" | 58 #include "V8Uint32Array.h" |
| 59 #include "V8Uint8Array.h" | 59 #include "V8Uint8Array.h" |
| 60 #include "V8Uint8ClampedArray.h" | 60 #include "V8Uint8ClampedArray.h" |
| 61 | 61 |
| 62 namespace WebCore { | 62 namespace WebCore { |
| 63 | 63 |
| 64 Node* InjectedScriptHost::scriptValueAsNode(ScriptValue value) | 64 Node* InjectedScriptHost::scriptValueAsNode(ScriptValue value) |
| 65 { | 65 { |
| 66 if (!value.isObject() || value.isNull()) | 66 if (!value.isObject() || value.isNull()) |
| 67 return 0; | 67 return 0; |
| 68 return V8Node::toNative(v8::Handle<v8::Object>::Cast(value.v8Value())); | 68 return V8Node::toNative(v8::Handle<v8::Object>::Cast(value.v8ValueRaw())); |
| 69 } | 69 } |
| 70 | 70 |
| 71 ScriptValue InjectedScriptHost::nodeAsScriptValue(ScriptState* state, Node* node
) | 71 ScriptValue InjectedScriptHost::nodeAsScriptValue(ScriptState* state, Node* node
) |
| 72 { | 72 { |
| 73 v8::HandleScope scope; | 73 v8::HandleScope scope; |
| 74 v8::Local<v8::Context> context = state->context(); | 74 v8::Local<v8::Context> context = state->context(); |
| 75 v8::Context::Scope contextScope(context); | 75 v8::Context::Scope contextScope(context); |
| 76 | 76 |
| 77 if (!BindingSecurity::shouldAllowAccessToNode(BindingState::instance(), node
)) | 77 if (!BindingSecurity::shouldAllowAccessToNode(BindingState::instance(), node
)) |
| 78 return ScriptValue(v8::Null()); | 78 return ScriptValue(v8::Null()); |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 | 330 |
| 331 InjectedScriptHost* host = V8InjectedScriptHost::toNative(args.Holder()); | 331 InjectedScriptHost* host = V8InjectedScriptHost::toNative(args.Holder()); |
| 332 ScriptDebugServer& debugServer = host->scriptDebugServer(); | 332 ScriptDebugServer& debugServer = host->scriptDebugServer(); |
| 333 return debugServer.setFunctionVariableValue(functionValue, scopeIndex, varia
bleName, newValue); | 333 return debugServer.setFunctionVariableValue(functionValue, scopeIndex, varia
bleName, newValue); |
| 334 } | 334 } |
| 335 | 335 |
| 336 | 336 |
| 337 } // namespace WebCore | 337 } // namespace WebCore |
| 338 | 338 |
| 339 #endif // ENABLE(INSPECTOR) | 339 #endif // ENABLE(INSPECTOR) |
| OLD | NEW |