OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 return v8::Local<v8::Value>(); | 98 return v8::Local<v8::Value>(); |
99 | 99 |
100 LocalFrame* frame = toDocument(scriptState->getExecutionContext())->frame(); | 100 LocalFrame* frame = toDocument(scriptState->getExecutionContext())->frame(); |
101 if (!frame) | 101 if (!frame) |
102 return v8::Local<v8::Value>(); | 102 return v8::Local<v8::Value>(); |
103 | 103 |
104 if (!scriptState->getExecutionContext()->canExecuteScripts( | 104 if (!scriptState->getExecutionContext()->canExecuteScripts( |
105 AboutToExecuteScript)) | 105 AboutToExecuteScript)) |
106 return v8::Local<v8::Value>(); | 106 return v8::Local<v8::Value>(); |
107 | 107 |
| 108 CHECK(BindingSecurity::shouldAllowAccessToFrame( |
| 109 toDOMWindow(handlerFunction->CreationContext())->toLocalDOMWindow(), |
| 110 frame, BindingSecurity::ErrorReportOption::DoNotReport)); |
| 111 |
108 v8::Local<v8::Value> parameters[1] = {jsEvent}; | 112 v8::Local<v8::Value> parameters[1] = {jsEvent}; |
109 v8::Local<v8::Value> result; | 113 v8::Local<v8::Value> result; |
110 if (!V8ScriptRunner::callFunction(handlerFunction, frame->document(), | 114 if (!V8ScriptRunner::callFunction(handlerFunction, frame->document(), |
111 receiver, WTF_ARRAY_LENGTH(parameters), | 115 receiver, WTF_ARRAY_LENGTH(parameters), |
112 parameters, scriptState->isolate()) | 116 parameters, scriptState->isolate()) |
113 .ToLocal(&result)) | 117 .ToLocal(&result)) |
114 return v8::Local<v8::Value>(); | 118 return v8::Local<v8::Value>(); |
115 return result; | 119 return result; |
116 } | 120 } |
117 | 121 |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 AccessControlStatus accessControlStatus = NotSharableCrossOrigin; | 248 AccessControlStatus accessControlStatus = NotSharableCrossOrigin; |
245 if (message->IsOpaque()) | 249 if (message->IsOpaque()) |
246 accessControlStatus = OpaqueResource; | 250 accessControlStatus = OpaqueResource; |
247 else if (message->IsSharedCrossOrigin()) | 251 else if (message->IsSharedCrossOrigin()) |
248 accessControlStatus = SharableCrossOrigin; | 252 accessControlStatus = SharableCrossOrigin; |
249 | 253 |
250 executionContext->dispatchErrorEvent(event, accessControlStatus); | 254 executionContext->dispatchErrorEvent(event, accessControlStatus); |
251 } | 255 } |
252 | 256 |
253 } // namespace blink | 257 } // namespace blink |
OLD | NEW |