Revision: 9616
Author: [email protected]
Date: Tue Jan 25 12:47:44 2011
Log: In the LoadModuleMessage, send the application supplied URL rather than the plugin's view of the URL.

This fixes the devmode tab title to display 'NewWebApp' or equivalent instead of 'hosted'.
http://code.google.com/p/google-web-toolkit/issues/detail?id=5908

Review at http://gwt-code-reviews.appspot.com/1318801

http://code.google.com/p/google-web-toolkit/source/detail?r=9616

Modified:
 /trunk/plugins/npapi/ScriptableInstance.cpp
/trunk/plugins/npapi/prebuilt/gwt-dev-plugin/Darwin-gcc3/gwtDev.plugin/Contents/MacOS/libGwtDevPlugin.dylib /trunk/plugins/npapi/prebuilt/gwt-dev-plugin/Linux_x86-gcc3/libGwtDevPlugin.so /trunk/plugins/npapi/prebuilt/gwt-dev-plugin/Linux_x86_64-gcc3/libGwtDevPlugin.so /trunk/plugins/npapi/prebuilt/gwt-dev-plugin/WINNT_x86-msvc/npGwtDevPlugin.dll
 /trunk/plugins/npapi/prebuilt/gwt-dev-plugin/manifest.json
 /trunk/plugins/npapi/prebuilt/gwt-dev-plugin.crx

=======================================
--- /trunk/plugins/npapi/ScriptableInstance.cpp Tue Nov 23 05:51:12 2010
+++ /trunk/plugins/npapi/ScriptableInstance.cpp Tue Jan 25 12:47:44 2011
@@ -352,8 +352,15 @@
     result->type = NPVariantType_Void;
     return;
   }
-  //ignore args[0]. Get the URL from window.location.href instead.
+
+  // application provided URL string used for user facing things like the
+  // devmode tab title
+  const NPString appUrl = args[0].value.stringValue;
+  const string appUrlStr = convertToString(appUrl);
+
+  // window.location.href provided URL. (used for security)
   const string urlStr = getLocationHref();
+
   const NPString sessionKey = args[1].value.stringValue;
   const NPString hostAddr = args[2].value.stringValue;
   const NPString moduleName = args[3].value.stringValue;
@@ -405,7 +412,7 @@
   string tabKeyStr = computeTabIdentity();
   string sessionKeyStr = convertToString(sessionKey);
Debug::log(Debug::Debugging) << " connected, sending loadModule" << Debug::flush; - connected = LoadModuleMessage::send(*_channel, urlStr, tabKeyStr, sessionKeyStr, + connected = LoadModuleMessage::send(*_channel, appUrlStr, tabKeyStr, sessionKeyStr,
       moduleNameStr, userAgent, this);
   BOOLEAN_TO_NPVARIANT(connected, *result);
   result->type = NPVariantType_Bool;
=======================================
--- /trunk/plugins/npapi/prebuilt/gwt-dev-plugin/Darwin-gcc3/gwtDev.plugin/Contents/MacOS/libGwtDevPlugin.dylib Wed Jan 12 09:43:25 2011 +++ /trunk/plugins/npapi/prebuilt/gwt-dev-plugin/Darwin-gcc3/gwtDev.plugin/Contents/MacOS/libGwtDevPlugin.dylib Tue Jan 25 12:47:44 2011
Binary file, no diff available.
=======================================
--- /trunk/plugins/npapi/prebuilt/gwt-dev-plugin/Linux_x86-gcc3/libGwtDevPlugin.so Wed Jan 12 09:43:25 2011 +++ /trunk/plugins/npapi/prebuilt/gwt-dev-plugin/Linux_x86-gcc3/libGwtDevPlugin.so Tue Jan 25 12:47:44 2011
File is too large to display a diff.
=======================================
--- /trunk/plugins/npapi/prebuilt/gwt-dev-plugin/Linux_x86_64-gcc3/libGwtDevPlugin.so Wed Jan 12 09:43:25 2011 +++ /trunk/plugins/npapi/prebuilt/gwt-dev-plugin/Linux_x86_64-gcc3/libGwtDevPlugin.so Tue Jan 25 12:47:44 2011
File is too large to display a diff.
=======================================
--- /trunk/plugins/npapi/prebuilt/gwt-dev-plugin/WINNT_x86-msvc/npGwtDevPlugin.dll Wed Jan 12 09:43:25 2011 +++ /trunk/plugins/npapi/prebuilt/gwt-dev-plugin/WINNT_x86-msvc/npGwtDevPlugin.dll Tue Jan 25 12:47:44 2011
Binary file, no diff available.
=======================================
--- /trunk/plugins/npapi/prebuilt/gwt-dev-plugin/manifest.json Wed Jan 12 09:43:25 2011 +++ /trunk/plugins/npapi/prebuilt/gwt-dev-plugin/manifest.json Tue Jan 25 12:47:44 2011
@@ -1,6 +1,6 @@
 {
   "name": "GWT Developer Plugin",
-  "version": "1.0.9521",
+  "version": "1.0.9614",
"description": "A plugin to enable debugging with GWT's Development Mode",
   "update_url": "https://dl-ssl.google.com/gwt/plugins/chrome/updates.xml";,
   "icons": {
=======================================
--- /trunk/plugins/npapi/prebuilt/gwt-dev-plugin.crx Wed Jan 12 09:43:25 2011 +++ /trunk/plugins/npapi/prebuilt/gwt-dev-plugin.crx Tue Jan 25 12:47:44 2011
Binary file, no diff available.

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to