summaryrefslogtreecommitdiffstats
path: root/components/nacl/renderer/ppb_nacl_private_impl.cc
Commit message (Collapse)AuthorAgeFilesLines
* NaCl cleanup: Remove use of the IMC bootstrap channelmseaborn2016-01-131-7/+0
| | | | | | | | | | | | | | | | | | | | | This channel was used for establishing further NaCl IMC connections across which we sent SRPC messages. This is no longer needed now that we don't use SRPC. * Stop creating the channel in the browser process (nacl_process_host.cc). * Remove the handle/FD fields from IPC messages. * Stop propagating the renderer-side handle through renderer code (service_runtime.cc and LaunchSelLdr()). BUG=302078 TEST=e.g. NaClBrowserTestPnacl.PPAPICore (tests PNaCl translation) Review URL: https://codereview.chromium.org/1579043002 Cr-Commit-Position: refs/heads/master@{#369042}
* NaCl cleanup: Remove now-unneeded uses of BrokerDuplicateHandle()mseaborn2016-01-111-16/+0
| | | | | | | | | | | | Now that we no longer use SRPC, we no longer need to supply an implementation of BrokerDuplicateHandle() for SRPC/IMC to use. BUG=302078 TEST=e.g. NaClBrowserTestPnacl.PPAPICore (tests PNaCl translation) Review URL: https://codereview.chromium.org/1575453004 Cr-Commit-Position: refs/heads/master@{#368695}
* PNaCl: Use Chrome IPC to talk to the linker process, instead of SRPCmseaborn2016-01-041-2/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the second-to-last remaining use of SRPC. * Change pnacl_translate_thread.cc to send its request using Chrome IPC instead of SRPC. Similarly, change irt_pnacl_translator_link.cc to receive its request this way. * Add plumbing so that pnacl_translate_thread.cc can acquire a Chrome IPC channel object. Change LaunchSelLdr() (in ppb_nacl_private.h) to return this channel, and plumb it through service_runtime.h too. * Extend nacl_message_scanner.cc to handle a couple of things our new IPC message needs: * File handles inside of std::vector<>s. * File handles inside of sync messages. (Previously, only sync replies were handled.) * Change a BUILD.gn to account for #includes of content/public/common/sandbox_init.h and ppapi/proxy/{serialized_handle.h,ppapi_messages.h}. BUG=302078 TEST=e.g. NaClBrowserTestPnacl.PPAPICore (tests PNaCl translation) Review URL: https://codereview.chromium.org/1512733003 Cr-Commit-Position: refs/heads/master@{#367369}
* Convert Pass()→std::move() in //components/[n-z]*dcheng2015-12-261-20/+17
| | | | | | | | | | BUG=557422 R=avi@chromium.org TBR=jochen@chromium.org Review URL: https://codereview.chromium.org/1548203002 Cr-Commit-Position: refs/heads/master@{#366914}
* Switch to standard integer types in components/, part 2 of 4.avi2015-12-261-0/+5
| | | | | | | | | BUG=138542 TBR=blundell@chromium.org Review URL: https://codereview.chromium.org/1548113002 Cr-Commit-Position: refs/heads/master@{#366877}
* NaCl: Fix a file descriptor leak on Unixmseaborn2015-12-011-0/+15
| | | | | | | | | | | | | | | | | Before this change, the renderer process leaks a file descriptor every time a PNaCl translator process is launched or a (P)NaCl process runs without calling the ppapi_start() API. There was no leak on Windows, because client-side IPC::ChannelHandles fill out the "name" field rather than the "pipe.handle" field. BUG=302078 TEST=Run an invalid pexe repeatedly and manually inspect /proc/PID/fd of the renderer process. Review URL: https://codereview.chromium.org/1473513005 Cr-Commit-Position: refs/heads/master@{#362440}
* PNaCl: Enable the Subzero translator for x86-32 without a flag.stichnot2015-11-301-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Tweaks the logic from https://codereview.chromium.org/1005173006/ so that the Subzero translator is always used for O0 translation on x86-32, regardless of the --enable-pnacl-subzero flag. Updates validation cache testing to reflect the use of the Subzero translator nexe. Disables the error handling test under Windows due to http://crbug.com/499878 because the O0 manifest tests now use Subzero. The flag is retained so that it can be used in the future to phase in Subzero for other targets, such as x86-64, arm32, and mips32, in the same way as was done for x86-32. This is a retry of https://codereview.chromium.org/1457183002/ . BUG=532718 TEST= git cl try -b linux_chromium_dbg_32_ng TEST= git cl try -b win_chromium_xp_rel_ng Review URL: https://codereview.chromium.org/1488543004 Cr-Commit-Position: refs/heads/master@{#362272}
* Revert "PNaCl: Enable the Subzero translator for x86-32 without a flag."stichnot2015-11-291-8/+3
| | | | | | | | | | | | | This reverts commit bcfc0fcc956c7523eb3788dcb8f855f5b912690f. XP tests for PNaCl error tests are failing. Subzero's error handling is apparently different in some respect from llc's error handling. See http://build.chromium.org/p/chromium.win/builders/XP%20Tests%20%281%29/builds/41379 BUG=532718 TBR=mseaborn Review URL: https://codereview.chromium.org/1486453002 Cr-Commit-Position: refs/heads/master@{#362070}
* PNaCl: Enable the Subzero translator for x86-32 without a flag.stichnot2015-11-281-3/+8
| | | | | | | | | | | | Tweaks the logic from https://codereview.chromium.org/1005173006/ so that the Subzero translator is always used for O0 translation on x86-32, regardless of the --enable-pnacl-subzero flag. The flag is retained so that it can be used in the future to phase in Subzero for other targets, such as x86-64, arm32, and mips32, in the same way as was done for x86-32. BUG=532718 Review URL: https://codereview.chromium.org/1457183002 Cr-Commit-Position: refs/heads/master@{#362047}
* Replace ToLower calls to the new formatbrettw2015-08-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replaces base::StringToLowerASCII(string) with base::ToLowerASCII(string) This form is 1:1 search and replace. A bunch of places did something like this: std::string foo(something_else); base::StringToLowerASCII(&foo); which became: foo = base::ToLowerASCII(something_else); A couple places really wanted in-place changing and they became: foo = base::ToLowerASCII(foo); There was pretty trivial cleanup in chrome_main_delegate.cc chrome/test/chromedriver/server/http_handler.cc (fix indenting). There was more cleanup in: chrome/installer/util/language_selector.cc and components/plugins/renderer/mobile_youtube_plugin.cc In components/history/core/browser/url_utils.cc I removed the call since it was calling ToLower on the host name out of a GURL, which is already guaranteed to be lower-case. NOPRESUBMIT=true (due to touching code with wstrings) Review URL: https://codereview.chromium.org/1279123004 Cr-Commit-Position: refs/heads/master@{#342659}
* Make the WebURLLoaderClients in the pepper code destroy (or have some guard) ↵tyoshino2015-08-061-15/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the loader in didFail() Currently Blink's ThreadableLoader calls didFinishLoading() after didFail() when both of the following conditions are met: - ThreadableLoader is not canceled (or destroyed) in didFail() - The response to cross-origin request (simple CORS request or preflight request) fails CORS check We plan to change ThreadableLoader not to call didFinishLoading() after didFail() call. But ManifestDownloader and PexeDownloader assumes the old behavior. This CL copies the things done in didFinishLoading() to didFail() of these classes and thus make a didFinishLoading() call after didFail() unnecessary to prepare for the change. ---- I wondered if PepperURLLoaderHost is expecting both didFinishLoading() and didFail() to be called. But it's only exposed via PepperPluginInstanceImpl::document_loader(), and to which only PluginDocumentParser::finish() delivers a notification. PluginDocumentParser never call both of didFinishLoading() and didFailLoading() on a PluginView. So, we don't have to worry about breakage, I think. ---- R=hiroshige,bbudge BUG=515850 Review URL: https://codereview.chromium.org/1267713003 Cr-Commit-Position: refs/heads/master@{#342061}
* Update SplitString calls in componentsbrettw2015-07-231-6/+3
| | | | | | | | This converts calls from the old form to the new form. Some calls that iterated over the results were changed to a range-based for loop with an inline call to SplitString. Some places were changed to use StringPieces when it was safe to do so. Review URL: https://codereview.chromium.org/1234973004 Cr-Commit-Position: refs/heads/master@{#340209}
* Remove legacy StartsWithASCII function.brettw2015-07-161-1/+2
| | | | | | | | | | | This replaces it with base::StartsWith and the appropriate case flag. Since the existing version only ever did case-insensitive tests in ASCII, there should be no behavior change. BUG=506255 TBR=jam Review URL: https://codereview.chromium.org/1242023005 Cr-Commit-Position: refs/heads/master@{#339175}
* Remove fallback code for getting pnacl-subzero tool name.jvoung2015-07-151-7/+1
| | | | | | | | | | | The pnacl.json file should have gotten the name after the M43 push, and we are on M46 now. BUG=none Review URL: https://codereview.chromium.org/1234293002 Cr-Commit-Position: refs/heads/master@{#338928}
* Move StartsWith[ASCII] to base namespace.brettw2015-06-121-1/+1
| | | | | | | | | NOPRESUBMIT=true (no presubmit due to removing base:: from a ScopedAllowIO) Review URL: https://codereview.chromium.org/1172183002 Cr-Commit-Position: refs/heads/master@{#334108}
* components: Remove use of MessageLoopProxy and deprecated MessageLoop APIsskyostil2015-06-021-33/+24
| | | | | | | | | | | This patch was mostly autogenerated with https://codereview.chromium.org/1010073002/. BUG=465354 Review URL: https://codereview.chromium.org/1144153004 Cr-Commit-Position: refs/heads/master@{#332440}
* Convert JsonWriter::Write to taking a const ref for the in-paramestade2015-05-161-3/+3
| | | | | | | | | | | | Clearer API; flushes out a lot of unnecessary heap allocations. depends on https://codereview.chromium.org/1129083003/ BUG=none Review URL: https://codereview.chromium.org/1131113004 Cr-Commit-Position: refs/heads/master@{#330255}
* Refactor NaClProcessHost. Reduce chances to leak the resource.hidehiko2015-05-071-9/+16
| | | | | | | | | | | | | | | | This is preparation to address review comments of https://codereview.chromium.org/1051243002/ Currently, there are some resource leak paths in nacl_process_host.cc. This CL removes those leaks, which are related to NaCl IPC types, defined in nacl_types.h. TEST=Ran bots. BUG=358417 Review URL: https://codereview.chromium.org/1094653003 Cr-Commit-Position: refs/heads/master@{#328698}
* SFI NaCl: Batch-open resource filesyusukes2015-05-051-1/+1
| | | | | | | | | | | | | | | | | | Add a hook to the IPC adapter to intercept PpapiHostMsg_OpenResource messages from the untrusted side so that the trusted side can immediately return prefetched descriptors without issuing Chrome IPC to the renderer process. This CL is an SFI NaCl version of https://codereview.chromium.org/649603004/. BUG=nativeclient:3802 BUG=348232 TEST=browser_tests (*PackagedAppTest.SuccessfulLoad) TEST=manually tested SFI ARC apps and PNaCl demo apps Review URL: https://codereview.chromium.org/1010183002 Cr-Commit-Position: refs/heads/master@{#328382}
* Refactor params of NaClProcessMsg_Start.hidehiko2015-04-301-10/+12
| | | | | | | | | | | | | | | This is a preparation to remove the resource leak related to NaClProcessMsg_Start IPC message. - Get rid of std::pair<std::string, std::string> for the prefetch request, instead introduced a struct NaClResourcePrefetchRequest. - Use the struct for JsonManifest::GetPrefetchableFiles. - Expand handles to named fields to CHECK the passed handles more properly in nacl_listener.cc - Get rid of nacl::FileDescriptor for the param, instead use IPC::PlatformFileForTransit. TEST=Ran bots. BUG=358417 Review URL: https://codereview.chromium.org/1085583005 Cr-Commit-Position: refs/heads/master@{#327666}
* Use of base::StringPairs appropriately in nacl.payal.pandey2015-04-291-2/+1
| | | | | | | | | | | Bescause base/strings/string_split.h defines: typedef std::vector<std::pair<std::string, std::string> > StringPairs; BUG=412250 Review URL: https://codereview.chromium.org/1109723002 Cr-Commit-Position: refs/heads/master@{#327452}
* Change ScopedPtrHashMap's 2nd template parameterkcwu2015-04-281-1/+2
| | | | | | | | | | | | | | | | Now ScopedPtrHashMap expect the 2nd parameter is scoped_ptr<T>. For example, old usage ScopedPtrHashMap<int, Value> new usage ScopedPtrHashMap<int, scoped_ptr<Value>> With this change, ScopedPtrHashMap support scoped_ptr's custom deleter. R=danakj@chromium.org, tzik@chromium.org BUG=none Review URL: https://codereview.chromium.org/1099383002 Cr-Commit-Position: refs/heads/master@{#327341}
* Set up a NaCl load status callback to start replacing "start_module".jvoung2015-04-221-19/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Uses the hook from: https://codereview.chromium.org/1089323006/ The NaClListener will set up a callback, and when the load status is known at the end of sel_main_chrome's LoadApp, it will use that to send the load_status to the renderer via Chrome IPC, instead of getting the load status from a "start_module" SRPC call. The renderer will use that load_status to report UMA stats and send progress events. This replaces the load_status coming from the SRPC "start_module::i" invocation. However, the invocation is kept for the moment because we currently block the sel_main_chrome until it is received to avoid a race condition. After this lands, we can remove the blocking and then remove the invocation. This also replaces the call to ReapLogs since that will be done once the load_status is known to be an error on the sel_main_chrome side instead. BUG= https://code.google.com/p/chromium/issues/detail?id=459250 Review URL: https://codereview.chromium.org/1090233003 Cr-Commit-Position: refs/heads/master@{#326393}
* Pepper: Remove a use of third_party/jsoncppteravest2015-04-211-25/+22
| | | | | | | | | | | | | Now that trusted plugin code is in components/nacl, we should be using libraries in base for json parsing instead of third_party/jsoncpp. This removes a small use for parsing the names of pnacl translation tools. BUG=476671 Review URL: https://codereview.chromium.org/1098163003 Cr-Commit-Position: refs/heads/master@{#326150}
* Stop adding the "files/" prefix when sending open_resource IPCyusukes2015-04-161-11/+1
| | | | | | | | | | | | | | | This is for simplifying https://codereview.chromium.org/1010183002/ This also removes 'if (key == kProgramKey) ...' check from JsonManifest::ResolveKey. This is safe because kProgram key was never passed to the function before the change. BUG=nativeclient:3802 TEST=git cl try, manually checked that both ARC and PNaCl demo still work Review URL: https://codereview.chromium.org/1070233007 Cr-Commit-Position: refs/heads/master@{#325547}
* Split PNaCl LLC and Subzero UMA stats (but retain a total bucket also).jvoung2015-04-031-25/+47
| | | | | | | | | | | That way we can compare the stats of LLC vs Subzero easily. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4090 CQ_EXTRA_TRYBOTS=tryserver.chromium.linux:linux_chromium_dbg_32_ng Review URL: https://codereview.chromium.org/1055243003 Cr-Commit-Position: refs/heads/master@{#323814}
* Move some of the PNaCl UMA stats to a common location.jvoung2015-04-021-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | Namely, translated nexe size stats were in one place, while downloaded pexe size stats were in another place, and then the ratio between pexe/nexe size was in one of the two places. Shift them all to be in the same place so that follow up CL can choose a suffix for Subzero vs not-Subzero (LLC) in one less place. This moves HistogramRatio to histogram.h instead of pnacl_coordinator and so I also ended up moving the remaining use of HistogramRatio to ppb_nacl_private so that it could just use the HistogramRatio. Also fix some outdated comments about the functions in ppb_nacl_private.h (GetNexeFd isn't part of the interface anymore, StreamPexe is), and fix some include guards that I noticed. TEST=browser_tests --gtest_filter=*Pnacl*UMA* BUG= https://code.google.com/p/nativeclient/issues/detail?id=4090 CQ_EXTRA_TRYBOTS=tryserver.chromium.linux:linux_chromium_dbg_32_ng Review URL: https://codereview.chromium.org/1056663003 Cr-Commit-Position: refs/heads/master@{#323514}
* Add a switch for using PNaCl Subzero and use it for -O0 translation.jvoung2015-03-311-20/+45
| | | | | | | | | | | | | | | | | | Toggles use of Subzero for x86-32 when given the --enable-pnacl-subzero flag (bikeshedding welcome). Is not used when debug metadata is present. Subzero O2 is approximately LLC O0 so adjust the optlevels. There isn't a way to select Subzero O0. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4091 CQ_EXTRA_TRYBOTS=tryserver.chromium.linux:linux_chromium_dbg_32_ng,linux_nacl_sdk_build TEST= (1) build 32-bit chrome under 64-bit kernel but a 32-bit linux container and install 64-bit libc/libstdc++. (2) xvfb-run --server-args="-screen 0 1024x768x24" out/Release/browser_tests --gtest_filter=*PnaclSubzero* Review URL: https://codereview.chromium.org/1005173006 Cr-Commit-Position: refs/heads/master@{#323063}
* Non-SFI NaCl: Batch-open resource filesyusukes2015-03-101-13/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Let the renderer pass URLs and manifest keys of the resource files when it asks the browser to start a new plugin process. * The browser opens all the URLs and passes file handlers to the plugin process if the process is for non-SFI mode. * Modify the non-SFI loader so that it can return a pre-opened handle without doing a renderer IPC when open_resource IRT is called. This CL does not change the current behavior of SFI NaCl. SFI NaCl support will be added in a separate CL: https://codereview.chromium.org/728113002/ Note that this CL is primarily for ARC (App Runtime for Chrome) which has 70+ DSO files. With this CL, the loading time of arc.nexe gets ~40% shorter. This CL should not affect NaCl applications other than ARC because most of them do not have that many DSO files, and even if they have some, opening one DSO file in the browser process takes only about 0.4ms (on Z620) which is usually negligible. TEST=PackagedAppTest.SuccessfulLoad TEST=manually checked that SFI-NaCl and PNaCl are still working. BUG=nativeclient:3802 BUG=348232 Review URL: https://codereview.chromium.org/649603004 Cr-Commit-Position: refs/heads/master@{#319931}
* NaCl: Simplify the plumbing for PPAPI's DevInterfacesEnabled flagmseaborn2015-01-241-18/+4
| | | | | | | | | | | | | | | There's no need for this flag to be sent from ppb_nacl_private_impl.cc to plugin.cc and back again. It can stay within ppb_nacl_private_impl.cc. This merges two error-handling checks in LaunchSelLdr(). BUG=239656 TEST=browser_tests Review URL: https://codereview.chromium.org/874603002 Cr-Commit-Position: refs/heads/master@{#313010}
* NaCl: Remove now-unneeded SRPC reverse service codemseaborn2015-01-231-34/+0
| | | | | | | | | | | | | | | | | | | | | | | The last active use of PluginReverseInterface was via its StartupInitializationComplete()/"init_done" method, but recent cleanups have made that into a no-op. We can therefore remove PluginReverseInterface. We no longer need to call NaCl's "reverse_setup" SRPC call. This removes the Chromium-side parts of the old SRPC-based open_resource() implementation, which was no longer called. This allows us to remove OpenManifestEntry() from PPB_NaCl_Private. Add some #includes to fix include-what-you-use problems that become apparent after removing code. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3864 TEST=NaCl tests in browser_tests Review URL: https://codereview.chromium.org/870923004 Cr-Commit-Position: refs/heads/master@{#312953}
* Cleanup: Fix some formatting nits in ppb_nacl_private_impl.ccmseaborn2015-01-231-7/+7
| | | | | | | | | BUG=none TEST=none Review URL: https://codereview.chromium.org/868603005 Cr-Commit-Position: refs/heads/master@{#312857}
* NaCl: Remove now-unused ReportLoadSuccess() function from PPB_NaCl_Privatemseaborn2015-01-231-12/+0
| | | | | | | | | BUG=428030 TEST=build Review URL: https://codereview.chromium.org/865303003 Cr-Commit-Position: refs/heads/master@{#312846}
* NaCl: Remove reliance on "init_done" SRPC call in the remaining PNaCl casemseaborn2015-01-221-24/+40
| | | | | | | | | | | | | | | | | | | | | | | Remove Plugin::BitcodeDidTranslateContinuation(), which gets called via the "init_done" SRPC call (which calls StartupInitializationComplete() in plugin/service_runtime.cc). Instead, arrange for its work to be done by the newer ManifestServiceProxy::StartupInitializationComplete(), by enabling ManifestServiceProxy for PNaCl. * To ensure that the open_resource() IPC stays disabled for PNaCl, we conditionalise ManifestServiceProxy::OpenResource(). * To ensure that the pexe size still gets reported on the "loadend" event, we stash it away in ReportTranslationFinished(). BUG=428030 TEST=NaClBrowserTestPnacl.ProgressEvents (checks reported pexe size is non-zero) Review URL: https://codereview.chromium.org/845013003 Cr-Commit-Position: refs/heads/master@{#312674}
* NaCl: Merge three global PP_Instance mappings into onemseaborn2015-01-221-41/+85
| | | | | | | | | | | | | | | | | | | | | | components/nacl/renderer/ had three mappings from PP_Instance IDs: * mapping to NexeLoadManager * mapping to JsonManifest * mapping to InstanceInfo Merging these into one will make it easier to add more per-PP_Instance state in the future. This also makes the lifetime of the objects mapped from PP_Instances clearer. This should fix a leak of InstanceInfo if untrusted code never calls the StartPpapiProxy IPC (though the IPC::ChannelHandle in it will still leak since this isn't owned). BUG=428030 TEST=NaCl tests in browser_tests Review URL: https://codereview.chromium.org/856583003 Cr-Commit-Position: refs/heads/master@{#312540}
* NaCl: Remove unused functions from PPB_NaCl_Privatemseaborn2015-01-221-45/+0
| | | | | | | | | BUG=428030 TEST=build Review URL: https://codereview.chromium.org/866583002 Cr-Commit-Position: refs/heads/master@{#312505}
* Remove nonsfi token workaround.teravest2015-01-151-14/+18
| | | | | | | | | | | | | | | | For Non-SFI plugins, NaCl executables retrieved via the "fast path" are no longer registered, and file tokens are no longer generated. This prevents unnecessary work from happening in the browser, and prevents tokens from being exposed to Non-SFI plugins. An earlier change was attempted that prevented using the "fast path" in the case of non-sfi plugins, but a performance regression was observed on ARC. BUG=394130 Review URL: https://codereview.chromium.org/840103003 Cr-Commit-Position: refs/heads/master@{#311758}
* Revert of Remove nonsfi token workaround. (patchset #1 id:20001 of ↵nya2015-01-071-19/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/807193006/) Reason for revert: This change caused huge ARC boot time regression on nonsfi mode (~600ms -> 900ms). See: go/arcperf Original issue's description: > Remove nonsfi token workaround. > > Previously, file tokens were exposed to nonsfi plugins. Now that this is fixed > (and we have test coverage for a nonsfi packaged app), we can remove the > workaround that allowed nonzero token values. > > BUG=394130 > TEST=browser_tests on linux_rel_precise32 > > Committed: https://crrev.com/4923bbcd251b3cf3519bc1251e26f8243db5ea02 > Cr-Commit-Position: refs/heads/master@{#309916} TBR=mseaborn@chromium.org,teravest@chromium.org NOTREECHECKS=true NOTRY=true BUG=394130 Review URL: https://codereview.chromium.org/836273002 Cr-Commit-Position: refs/heads/master@{#310250}
* Remove nonsfi token workaround.teravest2015-01-051-14/+19
| | | | | | | | | | | | | Previously, file tokens were exposed to nonsfi plugins. Now that this is fixed (and we have test coverage for a nonsfi packaged app), we can remove the workaround that allowed nonzero token values. BUG=394130 TEST=browser_tests on linux_rel_precise32 Review URL: https://codereview.chromium.org/807193006 Cr-Commit-Position: refs/heads/master@{#309916}
* Prefix CommandLine usage with base namespace (Part 9: components)kkosztyo.u-szeged2014-12-041-2/+3
| | | | | | | | | | | | Prefix all CommandLine usage in the components/ directory's following subdirectories: feedback, gcm_driver, google, infobars, invalidation, keyed_service, metrics, nacl, omnibox and os_crypt with the base:: namespace BUG=422426 Review URL: https://codereview.chromium.org/774933004 Cr-Commit-Position: refs/heads/master@{#306790}
* Allow IRT manifest_service open_resource with PNaCl translator nexes.jvoung2014-12-011-29/+22
| | | | | | | | | | | | | | | | | | | Get the routing id which allows setting up some of the PPAPI support including the manifest service channel. This was previously not done for PNaCl translators because start sel ldr was previously done off the main thread for PNaCl translators. However, PNaCl translators *do* now start sel ldr on the main thread. Only the nexe load/validation is done off the main thread to avoid blocking. Set the pnacl_mode to 0 for the PNaCl translators, so that open_resource is not filtered out during an interface query. TEST= manually w/ a hand built ld.nexe that uses the IRT open_resource. BUG= https://code.google.com/p/nativeclient/issues/detail?id=3914 Review URL: https://codereview.chromium.org/759913002 Cr-Commit-Position: refs/heads/master@{#306223}
* Standardize usage of virtual/override/final in components/dcheng2014-10-211-3/+3
| | | | | | | | | BUG=417463 TBR=blundell@chromium.org Review URL: https://codereview.chromium.org/666133002 Cr-Commit-Position: refs/heads/master@{#300456}
* replace OVERRIDE and FINAL with override and final in components/mostynb2014-10-061-2/+2
| | | | | | | | BUG=417463 Review URL: https://codereview.chromium.org/623133002 Cr-Commit-Position: refs/heads/master@{#298237}
* Fix: comparison between 'enum PP_NaClAppProcessType' and 'enum ↵jvoung2014-10-031-9/+13
| | | | | | | | | | | | | nacl::NaClAppProcessType' ChromeOS toolchain warns on this with -Werror=enum-compare. BUG= https://code.google.com/p/chromium/issues/detail?id=420066 BUG= https://code.google.com/p/nativeclient/issues/detail?id=3914 Review URL: https://codereview.chromium.org/624013002 Cr-Commit-Position: refs/heads/master@{#298064}
* NaCl: Replace launch/start param flags with a NaClAppProcessType enum.jvoung2014-10-031-15/+25
| | | | | | | | | | | | | | | | | | | | | | There was already an enum called NaClProcessType (for the broker, etc.), so I called this NaClAppProcessType instead. Renamed the original NaClProcessType to NaClTrustedProcessType. This type can then be used to decide on various things like crash throttling, nexe size limits, dyncode enablement, IRT usage rather than plumb separate flags through the various layers and IPCs. Then we can tweak the "uses_irt" to be "optional" for the PNaClTranslator as well. Misc: removed enable_dev_interfaces from service_runtime SelLdrStartParams struct, since it looked unused. BUG= https://code.google.com/p/nativeclient/issues/detail?id=3914 Review URL: https://codereview.chromium.org/614373004 Cr-Commit-Position: refs/heads/master@{#297987}
* Pepper: Stop using SRPC for irt_open_resource().Justin TerAvest2014-09-101-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | This registers an IRT interface in Chromium instead of using the one provided by NaCl. This reuses the ManifestServiceChannel used for providing irt_open_resource() in non-SFI mode. In this change, the Chromium implementation of NACL_IRT_RESOURCE_OPEN_v0_1 takes precedence over the one supplied by NaCl (which is SRPC-based). The SRPC-based codepath in service_runtime.cc needs to be kept because the PNaCl translator doesn't have the IRT available yet. I've added a check to enforce that's the only user of that codepath. BUG=394130 TEST=Manually tested with a file token that didn't resolve with a local patch that forced GetFilePath to fail in nacl_process_host.cc and confirmed that URLLoader* still passed. CQ_EXTRA_TRYBOTS=tryserver.chromium.linux:linux_rel_precise32 R=dmichael@chromium.org, mseaborn@chromium.org, tsepez@chromium.org Review URL: https://codereview.chromium.org/418423002 Cr-Commit-Position: refs/heads/master@{#294208}
* NaCl: Detect plugin crashes via EOF on Chromium IPC.Justin TerAvest2014-09-041-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | This change uses the OnChannelError() callback in TrustedPluginChannel to detect that the channel between the renderer and NaCl processes has closed. Previously, closure of the SRPC channel between those two processes was used to indicate a plugin crash. I wasn't sure at first that OnChannelError() would be called, but it appears to be called reliably in the testing that I've done. This change removes a call to ReportCrash() in ServiceRuntime::ReapLogs() since ReportCrash() has become a no-op. This change reenables the NaClBrowserTest*.Crash tests on Linux to ensure that there's good coverage-- they seem to pass. TEST=NaClBrowserTest*.Crash BUG=366334,401105 R=mseaborn@chromium.org Review URL: https://codereview.chromium.org/512323002 Cr-Commit-Position: refs/heads/master@{#293297}
* Drop NaCl support for posting stdout/stderr to JS.teravest2014-09-031-20/+0
| | | | | | | | | | | | | After sending an email to the native-client-discuss list, it was determined that this feature for redirecting stdout and stderr to JavaScript isn't very useful. This drops support for that feature; a follow up change to the NaCl repository will remove support there (and the SRPC message). BUG=406558 Review URL: https://codereview.chromium.org/513273003 Cr-Commit-Position: refs/heads/master@{#293224}
* Retry Set RequestContextObject for PNaCl pexe fetches, to fix On-Demand update.jvoung2014-08-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a race condition in the added test check in the previous attempt. That made the test Super Flaky. This is more noticeable in the Release builds than the Debug build that I was working with. (see https://codereview.chromium.org/471233003/) With a Release build I was able to repro the flakiness (40% failure over 200 runs). After the fix, I tested 500 runs and the success rate is now 100%. I can't say it won't flake for other reasons, but this fixes the main flake that was introduced. Historically, the test does ocassionally need to be retried due to timeouts, according to the bot log history. We may want to split the CORS and the non-CORS test case to see if that will help w/ timeouts. I didn't want to do that for this patch, since it would get much more complicated and this is intended for merging to M38. Retry with the race condition fixed. Also re-enable the test since it got disabled by another CL for being flaky. BUG=401755 BUG=315328 Review URL: https://codereview.chromium.org/524683002 Cr-Commit-Position: refs/heads/master@{#292807}
* Revert of Set RequestContextObject for PNaCl pexe fetches, to fix On-Demand ↵jvoung2014-08-291-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | update. (patchset #5 of https://codereview.chromium.org/471233003/) Reason for revert: Test is failing on a Blink bot on ChromeOS Original issue's description: > Set RequestContextObject for PNaCl pexe fetches, to fix On-Demand update. > > Add more checks to test to detect that the resource type of > the URL request is indeed OBJECT. > Would like to get this merged to the M38 branch. > > BUG=401755 > > Committed: https://chromium.googlesource.com/chromium/src/+/bfc3e122d6721ccc93f0f8b19dac4a3c2a0c947d TBR=teravest@chromium.org,ncbray@chromium.org NOTREECHECKS=true NOTRY=true BUG=401755 Review URL: https://codereview.chromium.org/524483002 Cr-Commit-Position: refs/heads/master@{#292522}