Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1060)

Side by Side Diff: Source/WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp

Issue 12926003: Merge 144458 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1410/
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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)
OLDNEW
« no previous file with comments | « Source/WebCore/bindings/v8/SharedPersistent.h ('k') | Source/WebCore/bindings/v8/custom/V8MessageEventCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698