summaryrefslogtreecommitdiffstats
path: root/ppapi/native_client
diff options
context:
space:
mode:
authorteravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-07 18:24:59 +0000
committerteravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-07 18:24:59 +0000
commitd3f3189f1cd8607b376827e21355d86715ab1aac (patch)
tree9c26c8c975ac25c4b783f3798dfc9e692b7153b3 /ppapi/native_client
parent8e0e355586a824abf0114cc761138ffdeb290973 (diff)
downloadchromium_src-d3f3189f1cd8607b376827e21355d86715ab1aac.zip
chromium_src-d3f3189f1cd8607b376827e21355d86715ab1aac.tar.gz
chromium_src-d3f3189f1cd8607b376827e21355d86715ab1aac.tar.bz2
Pepper: Remove unnecessary file descriptor dup.
There's an unnecessary file descriptor duplication in Plugin::NaClManifestFileDidOpen with a confusing comment. This change removes the call to DUP() which will make the change easier to read when moving this logic to components/nacl. BUG=239656 Review URL: https://codereview.chromium.org/227233008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262163 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/native_client')
-rw-r--r--ppapi/native_client/src/trusted/plugin/plugin.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/ppapi/native_client/src/trusted/plugin/plugin.cc b/ppapi/native_client/src/trusted/plugin/plugin.cc
index fe01eba..e84bb2e 100644
--- a/ppapi/native_client/src/trusted/plugin/plugin.cc
+++ b/ppapi/native_client/src/trusted/plugin/plugin.cc
@@ -832,12 +832,10 @@ void Plugin::NaClManifestFileDidOpen(int32_t pp_error) {
}
return;
}
- // SlurpFile closes the file descriptor after reading (or on error).
- // Duplicate our file descriptor since it will be handled by the browser.
- int dup_file_desc = DUP(info.get_desc());
nacl::string json_buffer;
+ // SlurpFile closes the file descriptor after reading (or on error).
file_utils::StatusCode status = file_utils::SlurpFile(
- dup_file_desc, json_buffer, kNaClManifestMaxFileBytes);
+ info.Release().desc, json_buffer, kNaClManifestMaxFileBytes);
if (status != file_utils::PLUGIN_FILE_SUCCESS) {
switch (status) {