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

Side by Side Diff: Source/bindings/v8/ScriptController.h

Issue 147333004: Revert of Limit the usage of SharedPersistent to ScriptValue only (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « Source/bindings/v8/ScopedPersistent.h ('k') | Source/bindings/v8/ScriptController.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2008, 2009 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 14 matching lines...) Expand all
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef ScriptController_h 31 #ifndef ScriptController_h
32 #define ScriptController_h 32 #define ScriptController_h
33 33
34 #include "bindings/v8/ScriptValue.h" 34 #include "bindings/v8/ScriptValue.h"
35 #include "bindings/v8/SharedPersistent.h"
36
35 #include "core/fetch/CrossOriginAccessControl.h" 37 #include "core/fetch/CrossOriginAccessControl.h"
36 #include "wtf/Forward.h" 38 #include "wtf/Forward.h"
37 #include "wtf/HashMap.h" 39 #include "wtf/HashMap.h"
38 #include "wtf/RefCounted.h" 40 #include "wtf/RefCounted.h"
39 #include "wtf/Vector.h" 41 #include "wtf/Vector.h"
40 #include "wtf/text/TextPosition.h" 42 #include "wtf/text/TextPosition.h"
41 #include <v8.h> 43 #include <v8.h>
42 44
43 struct NPObject; 45 struct NPObject;
44 46
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 static v8::Local<v8::Value> callFunction(ExecutionContext*, v8::Handle<v8::F unction>, v8::Handle<v8::Object> receiver, int argc, v8::Handle<v8::Value> info[ ], v8::Isolate*); 103 static v8::Local<v8::Value> callFunction(ExecutionContext*, v8::Handle<v8::F unction>, v8::Handle<v8::Object> receiver, int argc, v8::Handle<v8::Value> info[ ], v8::Isolate*);
102 104
103 // Returns true if the current world is isolated, and has its own Content 105 // Returns true if the current world is isolated, and has its own Content
104 // Security Policy. In this case, the policy of the main world should be 106 // Security Policy. In this case, the policy of the main world should be
105 // ignored when evaluating resources injected into the DOM. 107 // ignored when evaluating resources injected into the DOM.
106 bool shouldBypassMainWorldContentSecurityPolicy(); 108 bool shouldBypassMainWorldContentSecurityPolicy();
107 109
108 // Creates a property of the global object of a frame. 110 // Creates a property of the global object of a frame.
109 void bindToWindowObject(Frame*, const String& key, NPObject*); 111 void bindToWindowObject(Frame*, const String& key, NPObject*);
110 112
111 ScriptValue createPluginWrapper(Widget*); 113 PassRefPtr<SharedPersistent<v8::Object> > createPluginWrapper(Widget*);
112 114
113 void enableEval(); 115 void enableEval();
114 void disableEval(const String& errorMessage); 116 void disableEval(const String& errorMessage);
115 117
116 static bool canAccessFromCurrentOrigin(Frame*); 118 static bool canAccessFromCurrentOrigin(Frame*);
117 119
118 static void setCaptureCallStackForUncaughtExceptions(bool); 120 static void setCaptureCallStackForUncaughtExceptions(bool);
119 void collectIsolatedContexts(Vector<std::pair<ScriptState*, SecurityOrigin*> >&); 121 void collectIsolatedContexts(Vector<std::pair<ScriptState*, SecurityOrigin*> >&);
120 122
121 bool canExecuteScripts(ReasonForCallingCanExecuteScripts); 123 bool canExecuteScripts(ReasonForCallingCanExecuteScripts);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 // invalidate all sub-objects which are associated with that plugin. 177 // invalidate all sub-objects which are associated with that plugin.
176 // The frame keeps a NPObject reference for each item on the list. 178 // The frame keeps a NPObject reference for each item on the list.
177 PluginObjectMap m_pluginObjects; 179 PluginObjectMap m_pluginObjects;
178 180
179 NPObject* m_windowScriptNPObject; 181 NPObject* m_windowScriptNPObject;
180 }; 182 };
181 183
182 } // namespace WebCore 184 } // namespace WebCore
183 185
184 #endif // ScriptController_h 186 #endif // ScriptController_h
OLDNEW
« no previous file with comments | « Source/bindings/v8/ScopedPersistent.h ('k') | Source/bindings/v8/ScriptController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698