| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 Node* InjectedScriptHost::scriptValueAsNode(ScriptValue value) | 64 Node* InjectedScriptHost::scriptValueAsNode(ScriptValue value) |
| 65 { | 65 { |
| 66 v8::HandleScope scope(v8::Isolate::GetCurrent()); | 66 v8::HandleScope scope(v8::Isolate::GetCurrent()); |
| 67 if (!value.isObject() || value.isNull()) | 67 if (!value.isObject() || value.isNull()) |
| 68 return 0; | 68 return 0; |
| 69 return V8Node::toNative(v8::Handle<v8::Object>::Cast(value.v8Value())); | 69 return V8Node::toNative(v8::Handle<v8::Object>::Cast(value.v8Value())); |
| 70 } | 70 } |
| 71 | 71 |
| 72 ScriptValue InjectedScriptHost::nodeAsScriptValue(ScriptState* state, Node* node
) | 72 ScriptValue InjectedScriptHost::nodeAsScriptValue(ScriptState* state, Node* node
) |
| 73 { | 73 { |
| 74 v8::HandleScope scope; | 74 v8::HandleScope scope(state->isolate()); |
| 75 v8::Local<v8::Context> context = state->context(); | 75 v8::Local<v8::Context> context = state->context(); |
| 76 v8::Context::Scope contextScope(context); | 76 v8::Context::Scope contextScope(context); |
| 77 | 77 |
| 78 if (!BindingSecurity::shouldAllowAccessToNode(node)) | 78 if (!BindingSecurity::shouldAllowAccessToNode(node)) |
| 79 return ScriptValue(v8::Null()); | 79 return ScriptValue(v8::Null()); |
| 80 return ScriptValue(toV8(node, v8::Handle<v8::Object>(), context->GetIsolate(
))); | 80 return ScriptValue(toV8(node, v8::Handle<v8::Object>(), state->isolate())); |
| 81 } | 81 } |
| 82 | 82 |
| 83 void V8InjectedScriptHost::inspectedObjectMethodCustom(const v8::FunctionCallbac
kInfo<v8::Value>& args) | 83 void V8InjectedScriptHost::inspectedObjectMethodCustom(const v8::FunctionCallbac
kInfo<v8::Value>& args) |
| 84 { | 84 { |
| 85 if (args.Length() < 1) | 85 if (args.Length() < 1) |
| 86 return; | 86 return; |
| 87 | 87 |
| 88 if (!args[0]->IsInt32()) { | 88 if (!args[0]->IsInt32()) { |
| 89 throwTypeError("argument has to be an integer", args.GetIsolate()); | 89 throwTypeError("argument has to be an integer", args.GetIsolate()); |
| 90 return; | 90 return; |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 int lineNumber; | 431 int lineNumber; |
| 432 int columnNumber; | 432 int columnNumber; |
| 433 if (!getFunctionLocation(args, &scriptId, &lineNumber, &columnNumber)) | 433 if (!getFunctionLocation(args, &scriptId, &lineNumber, &columnNumber)) |
| 434 return; | 434 return; |
| 435 | 435 |
| 436 InjectedScriptHost* host = V8InjectedScriptHost::toNative(args.Holder()); | 436 InjectedScriptHost* host = V8InjectedScriptHost::toNative(args.Holder()); |
| 437 host->unmonitorFunction(scriptId, lineNumber, columnNumber); | 437 host->unmonitorFunction(scriptId, lineNumber, columnNumber); |
| 438 } | 438 } |
| 439 | 439 |
| 440 } // namespace WebCore | 440 } // namespace WebCore |
| OLD | NEW |