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

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

Issue 713743002: Remove a EscapableHandleScope from executeScriptInIsolatedWorld() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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 | « no previous file | Source/bindings/core/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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 v8::Local<v8::Value> executeScriptAndReturnValue(v8::Handle<v8::Context>, co nst ScriptSourceCode&, AccessControlStatus = NotSharableCrossOrigin, double* com pilationFinishTime = 0); 89 v8::Local<v8::Value> executeScriptAndReturnValue(v8::Handle<v8::Context>, co nst ScriptSourceCode&, AccessControlStatus = NotSharableCrossOrigin, double* com pilationFinishTime = 0);
90 90
91 // Executes JavaScript in an isolated world. The script gets its own global scope, 91 // Executes JavaScript in an isolated world. The script gets its own global scope,
92 // its own prototypes for intrinsic JavaScript objects (String, Array, and s o-on), 92 // its own prototypes for intrinsic JavaScript objects (String, Array, and s o-on),
93 // and its own wrappers for all DOM nodes and DOM constructors. 93 // and its own wrappers for all DOM nodes and DOM constructors.
94 // 94 //
95 // If an isolated world with the specified ID already exists, it is reused. 95 // If an isolated world with the specified ID already exists, it is reused.
96 // Otherwise, a new world is created. 96 // Otherwise, a new world is created.
97 // 97 //
98 // FIXME: Get rid of extensionGroup here. 98 // FIXME: Get rid of extensionGroup here.
99 // FIXME: We don't want to support multiple scripts.
99 void executeScriptInIsolatedWorld(int worldID, const Vector<ScriptSourceCode >& sources, int extensionGroup, Vector<v8::Local<v8::Value> >* results); 100 void executeScriptInIsolatedWorld(int worldID, const Vector<ScriptSourceCode >& sources, int extensionGroup, Vector<v8::Local<v8::Value> >* results);
100 101
101 // Returns true if argument is a JavaScript URL. 102 // Returns true if argument is a JavaScript URL.
102 bool executeScriptIfJavaScriptURL(const KURL&); 103 bool executeScriptIfJavaScriptURL(const KURL&);
103 104
104 v8::Local<v8::Value> callFunction(v8::Handle<v8::Function>, v8::Handle<v8::V alue>, int argc, v8::Handle<v8::Value> argv[]); 105 v8::Local<v8::Value> callFunction(v8::Handle<v8::Function>, v8::Handle<v8::V alue>, int argc, v8::Handle<v8::Value> argv[]);
105 static v8::Local<v8::Value> callFunction(ExecutionContext*, v8::Handle<v8::F unction>, v8::Handle<v8::Value> receiver, int argc, v8::Handle<v8::Value> info[] , v8::Isolate*); 106 static v8::Local<v8::Value> callFunction(ExecutionContext*, v8::Handle<v8::F unction>, v8::Handle<v8::Value> receiver, int argc, v8::Handle<v8::Value> info[] , v8::Isolate*);
106 107
107 // Returns true if the current world is isolated, and has its own Content 108 // Returns true if the current world is isolated, and has its own Content
108 // Security Policy. In this case, the policy of the main world should be 109 // Security Policy. In this case, the policy of the main world should be
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 // invalidate all sub-objects which are associated with that plugin. 172 // invalidate all sub-objects which are associated with that plugin.
172 // The frame keeps a NPObject reference for each item on the list. 173 // The frame keeps a NPObject reference for each item on the list.
173 PluginObjectMap m_pluginObjects; 174 PluginObjectMap m_pluginObjects;
174 175
175 NPObject* m_windowScriptNPObject; 176 NPObject* m_windowScriptNPObject;
176 }; 177 };
177 178
178 } // namespace blink 179 } // namespace blink
179 180
180 #endif // ScriptController_h 181 #endif // ScriptController_h
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/core/v8/ScriptController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698