| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007-2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2007-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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 #include "platform/instrumentation/tracing/TraceEvent.h" | 45 #include "platform/instrumentation/tracing/TraceEvent.h" |
| 46 | 46 |
| 47 namespace blink { | 47 namespace blink { |
| 48 | 48 |
| 49 ScheduledAction* ScheduledAction::create(ScriptState* scriptState, | 49 ScheduledAction* ScheduledAction::create(ScriptState* scriptState, |
| 50 ExecutionContext* target, | 50 ExecutionContext* target, |
| 51 const ScriptValue& handler, | 51 const ScriptValue& handler, |
| 52 const Vector<ScriptValue>& arguments) { | 52 const Vector<ScriptValue>& arguments) { |
| 53 ASSERT(handler.isFunction()); | 53 ASSERT(handler.isFunction()); |
| 54 if (!scriptState->world().isWorkerWorld()) { | 54 if (!scriptState->world().isWorkerWorld()) { |
| 55 CHECK(BindingSecurity::shouldAllowAccessToFrame( | 55 DCHECK(BindingSecurity::shouldAllowAccessToFrame( |
| 56 enteredDOMWindow(scriptState->isolate()), toDocument(target)->frame(), | 56 enteredDOMWindow(scriptState->isolate()), toDocument(target)->frame(), |
| 57 BindingSecurity::ErrorReportOption::DoNotReport)); | 57 BindingSecurity::ErrorReportOption::DoNotReport)); |
| 58 } | 58 } |
| 59 return new ScheduledAction(scriptState, handler, arguments); | 59 return new ScheduledAction(scriptState, handler, arguments); |
| 60 } | 60 } |
| 61 | 61 |
| 62 ScheduledAction* ScheduledAction::create(ScriptState* scriptState, | 62 ScheduledAction* ScheduledAction::create(ScriptState* scriptState, |
| 63 ExecutionContext* target, | 63 ExecutionContext* target, |
| 64 const String& handler) { | 64 const String& handler) { |
| 65 if (!scriptState->world().isWorkerWorld()) { | 65 if (!scriptState->world().isWorkerWorld()) { |
| 66 CHECK(BindingSecurity::shouldAllowAccessToFrame( | 66 DCHECK(BindingSecurity::shouldAllowAccessToFrame( |
| 67 enteredDOMWindow(scriptState->isolate()), toDocument(target)->frame(), | 67 enteredDOMWindow(scriptState->isolate()), toDocument(target)->frame(), |
| 68 BindingSecurity::ErrorReportOption::DoNotReport)); | 68 BindingSecurity::ErrorReportOption::DoNotReport)); |
| 69 } | 69 } |
| 70 return new ScheduledAction(scriptState, handler); | 70 return new ScheduledAction(scriptState, handler); |
| 71 } | 71 } |
| 72 | 72 |
| 73 DEFINE_TRACE(ScheduledAction) { | 73 DEFINE_TRACE(ScheduledAction) { |
| 74 visitor->trace(m_code); | 74 visitor->trace(m_code); |
| 75 } | 75 } |
| 76 | 76 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 } | 189 } |
| 190 | 190 |
| 191 void ScheduledAction::createLocalHandlesForArgs( | 191 void ScheduledAction::createLocalHandlesForArgs( |
| 192 Vector<v8::Local<v8::Value>>* handles) { | 192 Vector<v8::Local<v8::Value>>* handles) { |
| 193 handles->reserveCapacity(m_info.Size()); | 193 handles->reserveCapacity(m_info.Size()); |
| 194 for (size_t i = 0; i < m_info.Size(); ++i) | 194 for (size_t i = 0; i < m_info.Size(); ++i) |
| 195 handles->push_back(m_info.Get(i)); | 195 handles->push_back(m_info.Get(i)); |
| 196 } | 196 } |
| 197 | 197 |
| 198 } // namespace blink | 198 } // namespace blink |
| OLD | NEW |