adamlytics / svgweb

Automatically exported from code.google.com/p/svgweb
Other
0 stars 1 forks source link

Error in remove the original SVG OBJECT node from our handlers._svgObjects #637

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use any IE browser (IE9 force-flash)
2. Load webpage w/ svg
3. Unload webpage, error during flash cleanup

What is the expected output? What do you see instead?
IE throws error, source code line 1025 _handler is undefined

What version of the product are you using? On what operating system,
browser, and version of Flash?
svgweb-2011-02-03-Lurker-Above using IE9, Win2008 server, Flash version is WIN 
10,3,162,28

Please provide any additional information below. Reduced test cases are
always appreciated!
source code line 1025 _handler is undefined
      // remove the original SVG OBJECT node from our handlers._svgObjects
      // array
      var objID;
      if (typeof node._objID != 'undefined') { // native handler
        objID = node._objID;
      } else if (typeof node.contentDocument != 'undefined') { // IE
        // node is a Flash node; get a reference to our fake _Document
        // and then use that to get our Flash Handler
        objID = node.contentDocument._handler.id;
      } else {
        objID = node._handler.id;
      }

Original issue reported on code.google.com by osstec...@gmail.com on 7 Dec 2011 at 5:24

GoogleCodeExporter commented 9 years ago
// remove the original SVG OBJECT node from our handlers._svgObjects
// array
var objID;
if(typeof node._objID!='undefined') { // native handler
    objID=node._objID;
} else if(typeof node.contentDocument!='undefined') { // IE
    // node is a Flash node; get a reference to our fake _Document
    // and then use that to get our Flash Handler
    /*----------------------------------
    OSS:Hack temporary work around
    objID = node.contentDocument._handler.id;
    ----------------------------------*/
    objID=node.id;
} else {
    objID=node._handler.id;
}
/*----------------------------------
OSS:Hack temporary work around
----------------------------------*/
if(!objID)
    console.error("Can not resolve Flash handler id");

Original comment by osstec...@gmail.com on 7 Dec 2011 at 7:56

GoogleCodeExporter commented 9 years ago
We incorrectly specified a data-path and data-htc-filename which also included 
the path. Any improper definition causes 
FlashHandler._prepareBehavior
// attach SVG behavior to the page
ns.doImport(libraryPath+htcFilename);
to concat an invalid filePathName resulting in .htc not to load. No errors are 
thrown.
We have added a check in our startup for our stupid mistakes:
if(!gSVGDOMDoc.getElementsByTagNameNS) {
   console.error("_SVG:onLoad: .htc not loaded/initialized");
   return;
}

Original comment by osstec...@gmail.com on 20 Dec 2011 at 6:11