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

Side by Side Diff: chrome/browser/automation/testing_automation_provider.cc

Issue 10417031: Fix TestingAutomationProvider::SimulateAsanMemoryBug. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/automation/testing_automation_provider.h" 5 #include "chrome/browser/automation/testing_automation_provider.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 5867 matching lines...) Expand 10 before | Expand all | Expand 10 after
5878 base::Closure reply = 5878 base::Closure reply =
5879 base::Bind(SendSuccessReply, AsWeakPtr(), reply_message); 5879 base::Bind(SendSuccessReply, AsWeakPtr(), reply_message);
5880 g_browser_process->policy_service()->RefreshPolicies( 5880 g_browser_process->policy_service()->RefreshPolicies(
5881 base::Bind(PostTask, BrowserThread::IO, 5881 base::Bind(PostTask, BrowserThread::IO,
5882 base::Bind(PostTask, BrowserThread::FILE, 5882 base::Bind(PostTask, BrowserThread::FILE,
5883 base::Bind(PostTask, BrowserThread::IO, 5883 base::Bind(PostTask, BrowserThread::IO,
5884 base::Bind(PostTask, BrowserThread::UI, reply))))); 5884 base::Bind(PostTask, BrowserThread::UI, reply)))));
5885 #endif 5885 #endif
5886 } 5886 }
5887 5887
5888 static int AccessArray(const int arr[], int index) { 5888 static int AccessArray(const volatile int arr[], int index) {
5889 return arr[index]; 5889 return arr[index];
5890 } 5890 }
5891 5891
5892 void TestingAutomationProvider::SimulateAsanMemoryBug( 5892 void TestingAutomationProvider::SimulateAsanMemoryBug(
5893 base::DictionaryValue* args, IPC::Message* reply_message) { 5893 base::DictionaryValue* args, IPC::Message* reply_message) {
5894 int testarray[41]; 5894 volatile int testarray[41];
Nirnimesh 2012/05/22 16:29:43 please make a note here why it's volatile.
5895 AutomationJSONReply(this, reply_message).SendSuccess(NULL);
Nirnimesh 2012/05/22 16:29:43 Most pyauto automation hooks return _after_ they'v
5895 AccessArray(testarray, 42); 5896 AccessArray(testarray, 42);
5896 AutomationJSONReply(this, reply_message).SendSuccess(NULL);
5897 } 5897 }
5898 5898
5899 void TestingAutomationProvider::GetIndicesFromTab( 5899 void TestingAutomationProvider::GetIndicesFromTab(
5900 DictionaryValue* args, 5900 DictionaryValue* args,
5901 IPC::Message* reply_message) { 5901 IPC::Message* reply_message) {
5902 AutomationJSONReply reply(this, reply_message); 5902 AutomationJSONReply reply(this, reply_message);
5903 int id_or_handle = 0; 5903 int id_or_handle = 0;
5904 bool has_id = args->HasKey("tab_id"); 5904 bool has_id = args->HasKey("tab_id");
5905 bool has_handle = args->HasKey("tab_handle"); 5905 bool has_handle = args->HasKey("tab_handle");
5906 if (has_id && has_handle) { 5906 if (has_id && has_handle) {
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
6564 6564
6565 void TestingAutomationProvider::WaitForProcessLauncherThreadToGoIdle( 6565 void TestingAutomationProvider::WaitForProcessLauncherThreadToGoIdle(
6566 IPC::Message* reply_message) { 6566 IPC::Message* reply_message) {
6567 new WaitForProcessLauncherThreadToGoIdleObserver(this, reply_message); 6567 new WaitForProcessLauncherThreadToGoIdleObserver(this, reply_message);
6568 } 6568 }
6569 6569
6570 void TestingAutomationProvider::OnRemoveProvider() { 6570 void TestingAutomationProvider::OnRemoveProvider() {
6571 if (g_browser_process) 6571 if (g_browser_process)
6572 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); 6572 g_browser_process->GetAutomationProviderList()->RemoveProvider(this);
6573 } 6573 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698