summaryrefslogtreecommitdiffstats
path: root/ppapi/native_client
diff options
context:
space:
mode:
authorrobertm@google.com <robertm@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-03 17:46:38 +0000
committerrobertm@google.com <robertm@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-03 17:46:38 +0000
commit9f271c0254b0c8db9675e56e2f1c560fbdcaa61e (patch)
tree8a5f17d9e6de9325899a5b47683276c7d65bb091 /ppapi/native_client
parent4c683639ab0091eed3428ddffc9e9726345ee8b2 (diff)
downloadchromium_src-9f271c0254b0c8db9675e56e2f1c560fbdcaa61e.zip
chromium_src-9f271c0254b0c8db9675e56e2f1c560fbdcaa61e.tar.gz
chromium_src-9f271c0254b0c8db9675e56e2f1c560fbdcaa61e.tar.bz2
Workaround a problem where clang and gcc behavior wrt the creation of temp objects differs.
Since the ctor/dtor make pepper calls this results in observable differences in program behavior. The workaround is to use different lifetimes for the objects involved. I will leave the bug open until this is better understood. BUG= http://code.google.com/p/nativeclient/issues/detail?id=2293 Review URL: http://codereview.chromium.org/8102006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103737 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/native_client')
-rw-r--r--ppapi/native_client/tests/ppapi_simple_tests/file.cc9
-rw-r--r--ppapi/native_client/tests/ppapi_simple_tests/file1.stdin2
-rw-r--r--ppapi/native_client/tests/ppapi_simple_tests/file2.stdin4
-rw-r--r--ppapi/native_client/tests/ppapi_simple_tests/file2.stdout2
4 files changed, 12 insertions, 5 deletions
diff --git a/ppapi/native_client/tests/ppapi_simple_tests/file.cc b/ppapi/native_client/tests/ppapi_simple_tests/file.cc
index 97b8c04..9ff87d3 100644
--- a/ppapi/native_client/tests/ppapi_simple_tests/file.cc
+++ b/ppapi/native_client/tests/ppapi_simple_tests/file.cc
@@ -144,7 +144,7 @@ class ReaderStreamAsFile {
}
void OpenFile() {
- file_ref_ = new pp::FileRef(response_info_->GetBodyAsFileRef());
+ file_ref_ = new pp::FileRef(loader_.GetResponseInfo().GetBodyAsFileRef());
CHECK(!file_ref_->is_null());
file_io_ = new pp::FileIO(instance_);
@@ -183,10 +183,9 @@ class ReaderStreamAsFile {
static void OpenURLCompleteCallback(void* thiz, int32_t result) {
ReaderStreamAsFile* reader = static_cast<ReaderStreamAsFile*>(thiz);
- reader->response_info_ =
- new pp::URLResponseInfo(reader->loader_.GetResponseInfo());
- CHECK(!reader->response_info_->is_null());
- int32_t status_code = reader->response_info_->GetStatusCode();
+ pp::URLResponseInfo response_info(reader->loader_.GetResponseInfo());
+ CHECK(!response_info.is_null());
+ int32_t status_code = response_info.GetStatusCode();
if (status_code != 200) {
reader->Message("Error: OpenURLCompleteCallback unexpected status code");
return;
diff --git a/ppapi/native_client/tests/ppapi_simple_tests/file1.stdin b/ppapi/native_client/tests/ppapi_simple_tests/file1.stdin
index 31540d7..ad3a304 100644
--- a/ppapi/native_client/tests/ppapi_simple_tests/file1.stdin
+++ b/ppapi/native_client/tests/ppapi_simple_tests/file1.stdin
@@ -2,6 +2,8 @@
# sel_universal_ppapi_replay_prolog.stdin
# define a bunch of variables for readability
+# NOTE: this test exercises the request.SetStreamToFile(false) case
+
set_variable MODULE i(4444)
set_variable INSTANCE i(5555)
diff --git a/ppapi/native_client/tests/ppapi_simple_tests/file2.stdin b/ppapi/native_client/tests/ppapi_simple_tests/file2.stdin
index c895f36..090425dc 100644
--- a/ppapi/native_client/tests/ppapi_simple_tests/file2.stdin
+++ b/ppapi/native_client/tests/ppapi_simple_tests/file2.stdin
@@ -2,6 +2,10 @@
# sel_universal_ppapi_replay_prolog.stdin
# define a bunch of variables for readability
+# NOTE: this test exercises the request.SetStreamToFile(true) case
+# which does not result in a 200 return code
+# So the expected outcome of this tests is a failure.
+
set_variable MODULE i(4444)
set_variable INSTANCE i(5555)
diff --git a/ppapi/native_client/tests/ppapi_simple_tests/file2.stdout b/ppapi/native_client/tests/ppapi_simple_tests/file2.stdout
index 79e80bfe..2d1318c 100644
--- a/ppapi/native_client/tests/ppapi_simple_tests/file2.stdout
+++ b/ppapi/native_client/tests/ppapi_simple_tests/file2.stdout
@@ -80,6 +80,8 @@ output 0: i(1)
replaying PPB_Messaging_PostMessage:iC::
input 0: i(5555)
input 1: C(48,\x05\x00\x00\x00!\x00\x00\x005555: Error: Finish unexpected rv\x00\x00\x00\x00\x00\x00\x00)
+replaying PPB_Core_ReleaseResource:i::
+input 0: i(38)
rpc call complete RunCompletionCallback:iiC: