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 28 matching lines...) Expand all Loading... |
39 #include "core/dom/Document.h" | 39 #include "core/dom/Document.h" |
40 #include "core/dom/ExecutionContext.h" | 40 #include "core/dom/ExecutionContext.h" |
41 #include "core/frame/LocalFrame.h" | 41 #include "core/frame/LocalFrame.h" |
42 #include "core/workers/WorkerGlobalScope.h" | 42 #include "core/workers/WorkerGlobalScope.h" |
43 #include "core/workers/WorkerThread.h" | 43 #include "core/workers/WorkerThread.h" |
44 #include "platform/Logging.h" | 44 #include "platform/Logging.h" |
45 #include "platform/TraceEvent.h" | 45 #include "platform/TraceEvent.h" |
46 | 46 |
47 namespace blink { | 47 namespace blink { |
48 | 48 |
49 PassOwnPtr<ScheduledAction> ScheduledAction::create(ScriptState* scriptState, co
nst ScriptValue& handler, const Vector<ScriptValue>& arguments) | 49 PassOwnPtrWillBeRawPtr<ScheduledAction> ScheduledAction::create(ScriptState* scr
iptState, const ScriptValue& handler, const Vector<ScriptValue>& arguments) |
50 { | 50 { |
51 ASSERT(handler.isFunction()); | 51 ASSERT(handler.isFunction()); |
52 return adoptPtr(new ScheduledAction(scriptState, handler, arguments)); | 52 return adoptPtrWillBeNoop(new ScheduledAction(scriptState, handler, argument
s)); |
53 } | 53 } |
54 | 54 |
55 PassOwnPtr<ScheduledAction> ScheduledAction::create(ScriptState* scriptState, co
nst String& handler) | 55 PassOwnPtrWillBeRawPtr<ScheduledAction> ScheduledAction::create(ScriptState* scr
iptState, const String& handler) |
56 { | 56 { |
57 return adoptPtr(new ScheduledAction(scriptState, handler)); | 57 return adoptPtrWillBeNoop(new ScheduledAction(scriptState, handler)); |
| 58 } |
| 59 |
| 60 void ScheduledAction::trace(Visitor* visitor) |
| 61 { |
| 62 visitor->trace(m_code); |
58 } | 63 } |
59 | 64 |
60 ScheduledAction::~ScheduledAction() | 65 ScheduledAction::~ScheduledAction() |
61 { | 66 { |
62 } | 67 } |
63 | 68 |
64 void ScheduledAction::execute(ExecutionContext* context) | 69 void ScheduledAction::execute(ExecutionContext* context) |
65 { | 70 { |
66 if (context->isDocument()) { | 71 if (context->isDocument()) { |
67 LocalFrame* frame = toDocument(context)->frame(); | 72 LocalFrame* frame = toDocument(context)->frame(); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 } | 141 } |
137 | 142 |
138 void ScheduledAction::createLocalHandlesForArgs(Vector<v8::Handle<v8::Value> >*
handles) | 143 void ScheduledAction::createLocalHandlesForArgs(Vector<v8::Handle<v8::Value> >*
handles) |
139 { | 144 { |
140 handles->reserveCapacity(m_info.Size()); | 145 handles->reserveCapacity(m_info.Size()); |
141 for (size_t i = 0; i < m_info.Size(); ++i) | 146 for (size_t i = 0; i < m_info.Size(); ++i) |
142 handles->append(m_info.Get(i)); | 147 handles->append(m_info.Get(i)); |
143 } | 148 } |
144 | 149 |
145 } // namespace blink | 150 } // namespace blink |
OLD | NEW |