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

Side by Side Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 2339683006: [Blink] Modify SuspendableScriptExecutor to take a v8::Function (Closed)
Patch Set: Haraken's Created 4 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 Google Inc. All rights reserved. 2 * Copyright (C) 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 753 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 void WebLocalFrameImpl::requestExecuteScriptAndReturnValue( 764 void WebLocalFrameImpl::requestExecuteScriptAndReturnValue(
765 const WebScriptSource& source, 765 const WebScriptSource& source,
766 bool userGesture, 766 bool userGesture,
767 WebScriptExecutionCallback* callback) { 767 WebScriptExecutionCallback* callback) {
768 DCHECK(frame()); 768 DCHECK(frame());
769 769
770 SuspendableScriptExecutor::createAndRun( 770 SuspendableScriptExecutor::createAndRun(
771 frame(), 0, createSourcesVector(&source, 1), 0, userGesture, callback); 771 frame(), 0, createSourcesVector(&source, 1), 0, userGesture, callback);
772 } 772 }
773 773
774 void WebLocalFrameImpl::requestExecuteV8Function(
775 v8::Local<v8::Function> function,
776 v8::Local<v8::Value> receiver,
777 int argc,
778 v8::Local<v8::Value> argv[],
779 WebScriptExecutionCallback* callback) {
780 DCHECK(frame());
781 SuspendableScriptExecutor::createAndRun(frame(), toIsolate(frame()), function,
782 receiver, argc, argv, callback);
783 }
784
774 void WebLocalFrameImpl::executeScriptInIsolatedWorld( 785 void WebLocalFrameImpl::executeScriptInIsolatedWorld(
775 int worldID, 786 int worldID,
776 const WebScriptSource* sourcesIn, 787 const WebScriptSource* sourcesIn,
777 unsigned numSources, 788 unsigned numSources,
778 int extensionGroup, 789 int extensionGroup,
779 WebVector<v8::Local<v8::Value>>* results) { 790 WebVector<v8::Local<v8::Value>>* results) {
780 DCHECK(frame()); 791 DCHECK(frame());
781 CHECK_GT(worldID, 0); 792 CHECK_GT(worldID, 0);
782 CHECK_LT(worldID, EmbedderWorldIdLimit); 793 CHECK_LT(worldID, EmbedderWorldIdLimit);
783 794
(...skipping 1536 matching lines...) Expand 10 before | Expand all | Expand 10 after
2320 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; 2331 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol;
2321 } else if (metric == "wasAlternateProtocolAvailable") { 2332 } else if (metric == "wasAlternateProtocolAvailable") {
2322 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; 2333 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable;
2323 } else if (metric == "connectionInfo") { 2334 } else if (metric == "connectionInfo") {
2324 feature = UseCounter::ChromeLoadTimesConnectionInfo; 2335 feature = UseCounter::ChromeLoadTimesConnectionInfo;
2325 } 2336 }
2326 UseCounter::count(frame(), feature); 2337 UseCounter::count(frame(), feature);
2327 } 2338 }
2328 2339
2329 } // namespace blink 2340 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698