gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] /srv/bzr/gnash/trunk r10439: Make the SharedObject key ti


From: Benjamin Wolsey
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r10439: Make the SharedObject key tidier while ensuring it's correct. Add note to
Date: Mon, 15 Dec 2008 13:29:59 +0100
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 10439
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Mon 2008-12-15 13:29:59 +0100
message:
  Make the SharedObject key tidier while ensuring it's correct. Add note to
  URL dox.
modified:
  libbase/URL.h
  libcore/asobj/SharedObject.cpp
=== modified file 'libbase/URL.h'
--- a/libbase/URL.h     2008-06-14 21:12:13 +0000
+++ b/libbase/URL.h     2008-12-15 12:29:59 +0000
@@ -15,8 +15,8 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-#ifndef __GNASH_URL_H__
-#define __GNASH_URL_H__
+#ifndef GNASH_URL_H
+#define GNASH_URL_H
 
 #include "dsodefs.h"
 
@@ -71,6 +71,8 @@
        const std::string& port() const { return _port; }
 
        /// Return the 'path' member of this URL, as a string
+    //
+    /// The returned path starts with '/'
        const std::string& path() const { return _path; }
 
        /// Return the 'anchor' member of this URL, as a string

=== modified file 'libcore/asobj/SharedObject.cpp'
--- a/libcore/asobj/SharedObject.cpp    2008-12-14 12:48:17 +0000
+++ b/libcore/asobj/SharedObject.cpp    2008-12-15 12:29:59 +0000
@@ -545,7 +545,12 @@
 
     // If the domain name is empty, the SWF was loaded from the filesystem.
     // Use "localhost".
-    solPath << (_baseDomain.empty() ? "localhost" : _baseDomain) << "/";
+    solPath << (_baseDomain.empty() ? "localhost" : _baseDomain);
+
+    // Paths should start with a '/', so we shouldn't have to add another
+    // one.
+    assert(requestedPath.empty() ? _basePath[0] == '/' :
+                                    requestedPath[0] == '/');
 
     // If no path was requested, use the SWF's path.
     solPath << (requestedPath.empty() ? _basePath : requestedPath) << "/"
@@ -562,7 +567,8 @@
         log_debug("SharedObject %s already known, returning it", key);
         return it->second;
     }
-    log_debug("SharedObject %s not known, creating it", key);
+
+    log_debug("SharedObject %s not loaded. Loading it now", key);
 
     // Otherwise create a new one and register to the lib
     SharedObject* obj = new SharedObject();


reply via email to

[Prev in Thread] Current Thread [Next in Thread]