| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2011 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 for (int i = 0; i < paramCount; i++) { | 121 for (int i = 0; i < paramCount; i++) { |
| 122 // parameters must be globalized | 122 // parameters must be globalized |
| 123 params[i] = info[i+2]; | 123 params[i] = info[i+2]; |
| 124 } | 124 } |
| 125 } | 125 } |
| 126 | 126 |
| 127 // params is passed to action, and released in action's destructor | 127 // params is passed to action, and released in action's destructor |
| 128 ASSERT(imp->frame()); | 128 ASSERT(imp->frame()); |
| 129 action = adoptPtr(new ScheduledAction(context, v8::Handle<v8::Function>:
:Cast(function), paramCount, params.get(), info.GetIsolate())); | 129 action = adoptPtr(new ScheduledAction(context, v8::Handle<v8::Function>:
:Cast(function), paramCount, params.get(), info.GetIsolate())); |
| 130 } else { | 130 } else { |
| 131 if (imp->document() && !imp->document()->contentSecurityPolicy()->allowS
criptEval()) { | 131 if (imp->document() && !imp->document()->contentSecurityPolicy()->allowE
val()) { |
| 132 v8SetReturnValue(info, 0); | 132 v8SetReturnValue(info, 0); |
| 133 return; | 133 return; |
| 134 } | 134 } |
| 135 ASSERT(imp->frame()); | 135 ASSERT(imp->frame()); |
| 136 action = adoptPtr(new ScheduledAction(context, functionString, KURL(), i
nfo.GetIsolate())); | 136 action = adoptPtr(new ScheduledAction(context, functionString, KURL(), i
nfo.GetIsolate())); |
| 137 } | 137 } |
| 138 | 138 |
| 139 int32_t timeout = argumentCount >= 2 ? info[1]->Int32Value() : 0; | 139 int32_t timeout = argumentCount >= 2 ? info[1]->Int32Value() : 0; |
| 140 int timerId; | 140 int timerId; |
| 141 if (singleShot) | 141 if (singleShot) |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 v8::Handle<v8::Context> context = toV8Context(isolate, frame, DOMWrapperWorl
d::current(isolate)); | 554 v8::Handle<v8::Context> context = toV8Context(isolate, frame, DOMWrapperWorl
d::current(isolate)); |
| 555 if (context.IsEmpty()) | 555 if (context.IsEmpty()) |
| 556 return v8Undefined(); | 556 return v8Undefined(); |
| 557 | 557 |
| 558 v8::Handle<v8::Object> global = context->Global(); | 558 v8::Handle<v8::Object> global = context->Global(); |
| 559 ASSERT(!global.IsEmpty()); | 559 ASSERT(!global.IsEmpty()); |
| 560 return global; | 560 return global; |
| 561 } | 561 } |
| 562 | 562 |
| 563 } // namespace WebCore | 563 } // namespace WebCore |
| OLD | NEW |