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

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

Issue 686763002: Fix Runtime.executionContextCreated for crafted iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Do not force context initialization 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
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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 static PassOwnPtrWillBeRawPtr<ScriptController> create(LocalFrame* frame) 73 static PassOwnPtrWillBeRawPtr<ScriptController> create(LocalFrame* frame)
74 { 74 {
75 return adoptPtrWillBeNoop(new ScriptController(frame)); 75 return adoptPtrWillBeNoop(new ScriptController(frame));
76 } 76 }
77 77
78 ~ScriptController(); 78 ~ScriptController();
79 void trace(Visitor*); 79 void trace(Visitor*);
80 80
81 bool initializeMainWorld(); 81 bool initializeMainWorld();
82 bool isMainWorldInitialized();
82 WindowProxy* windowProxy(DOMWrapperWorld&); 83 WindowProxy* windowProxy(DOMWrapperWorld&);
83 WindowProxy* existingWindowProxy(DOMWrapperWorld&); 84 WindowProxy* existingWindowProxy(DOMWrapperWorld&);
84 85
85 // Evaluate JavaScript in the main world. 86 // Evaluate JavaScript in the main world.
86 void executeScriptInMainWorld(const String&, ExecuteScriptPolicy = DoNotExec uteScriptWhenScriptsDisabled); 87 void executeScriptInMainWorld(const String&, ExecuteScriptPolicy = DoNotExec uteScriptWhenScriptsDisabled);
87 void executeScriptInMainWorld(const ScriptSourceCode&, AccessControlStatus = NotSharableCrossOrigin, double* compilationFinishTime = 0); 88 void executeScriptInMainWorld(const ScriptSourceCode&, AccessControlStatus = NotSharableCrossOrigin, double* compilationFinishTime = 0);
88 v8::Local<v8::Value> executeScriptInMainWorldAndReturnValue(const ScriptSour ceCode&); 89 v8::Local<v8::Value> executeScriptInMainWorldAndReturnValue(const ScriptSour ceCode&);
89 v8::Local<v8::Value> executeScriptAndReturnValue(v8::Handle<v8::Context>, co nst ScriptSourceCode&, AccessControlStatus = NotSharableCrossOrigin, double* com pilationFinishTime = 0); 90 v8::Local<v8::Value> executeScriptAndReturnValue(v8::Handle<v8::Context>, co nst ScriptSourceCode&, AccessControlStatus = NotSharableCrossOrigin, double* com pilationFinishTime = 0);
90 91
91 // Executes JavaScript in an isolated world. The script gets its own global scope, 92 // Executes JavaScript in an isolated world. The script gets its own global scope,
(...skipping 79 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

Powered by Google App Engine
This is Rietveld 408576698