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

Unified Diff: webkit/plugins/npapi/test/plugin_windowless_test.cc

Issue 10833017: Fix gcc 4.7 building problems - cont 2. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Modified per Adam's comments Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/plugins/npapi/test/plugin_execute_stream_javascript.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/npapi/test/plugin_windowless_test.cc
diff --git a/webkit/plugins/npapi/test/plugin_windowless_test.cc b/webkit/plugins/npapi/test/plugin_windowless_test.cc
index d92a43173710e191f0b5284c9bc81ebd2d3e2237..9013651bf32416e9af982944ed1c99eb72a26cc2 100644
--- a/webkit/plugins/npapi/test/plugin_windowless_test.cc
+++ b/webkit/plugins/npapi/test/plugin_windowless_test.cc
@@ -134,7 +134,13 @@ NPError WindowlessPluginTest::ExecuteScript(NPNetscapeFuncs* browser, NPP id,
std::string script_url = "javascript:";
script_url += script;
- NPString script_string = { script_url.c_str(), script_url.length() };
+ size_t script_length = script_url.length();
+ if (script_length != static_cast<uint32_t>(script_length)) {
+ return NPERR_GENERIC_ERROR;
+ }
+
+ NPString script_string = { script_url.c_str(),
+ static_cast<uint32_t>(script_length) };
NPObject *window_obj = NULL;
browser->getvalue(id, NPNVWindowNPObject, &window_obj);
« no previous file with comments | « webkit/plugins/npapi/test/plugin_execute_stream_javascript.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698