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

Side by Side Diff: Source/bindings/core/v8/custom/V8WindowCustom.cpp

Issue 660863002: [DevTools] Added public method for async execution of scripts (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: platform/WebExecuteScriptCallback -> web/WebScriptCallback Created 6 years, 2 months 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) 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 // Don't allow setting timeouts to run empty functions! 101 // Don't allow setting timeouts to run empty functions!
102 // (Bug 1009597) 102 // (Bug 1009597)
103 if (!functionString.length()) 103 if (!functionString.length())
104 return; 104 return;
105 } 105 }
106 106
107 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), impl->fram e(), exceptionState)) 107 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), impl->fram e(), exceptionState))
108 return; 108 return;
109 109
110 OwnPtr<ScheduledAction> action; 110 OwnPtr<ScheduledActionBase> action;
111 if (function->IsFunction()) { 111 if (function->IsFunction()) {
112 int paramCount = argumentCount >= 2 ? argumentCount - 2 : 0; 112 int paramCount = argumentCount >= 2 ? argumentCount - 2 : 0;
113 OwnPtr<v8::Local<v8::Value>[]> params; 113 OwnPtr<v8::Local<v8::Value>[]> params;
114 if (paramCount > 0) { 114 if (paramCount > 0) {
115 params = adoptArrayPtr(new v8::Local<v8::Value>[paramCount]); 115 params = adoptArrayPtr(new v8::Local<v8::Value>[paramCount]);
116 for (int i = 0; i < paramCount; i++) { 116 for (int i = 0; i < paramCount; i++) {
117 // parameters must be globalized 117 // parameters must be globalized
118 params[i] = info[i+2]; 118 params[i] = info[i+2];
119 } 119 }
120 } 120 }
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::curren t(isolate)); 542 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::curren t(isolate));
543 if (context.IsEmpty()) 543 if (context.IsEmpty())
544 return v8Undefined(); 544 return v8Undefined();
545 545
546 v8::Handle<v8::Object> global = context->Global(); 546 v8::Handle<v8::Object> global = context->Global();
547 ASSERT(!global.IsEmpty()); 547 ASSERT(!global.IsEmpty());
548 return global; 548 return global;
549 } 549 }
550 550
551 } // namespace blink 551 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698