@@ -40,34 +40,6 @@ const _ = function() {
4040const getFirstSnapshot = ( doc , node , query ) =>
4141 doc . evaluate ( query , node , null , 7 , null ) . snapshotItem ( 0 ) ;
4242
43- const checkSameOrigin = ( node , tryLoadUri ) => {
44- try {
45- if ( ! ( tryLoadUri instanceof Ci . nsIURI ) ) {
46- tryLoadUri = Services . io . newURI ( tryLoadUri , null , null ) ;
47- }
48- if ( tryLoadUri . schemeIs ( "data" ) ) {
49- return true ;
50- }
51- let pr = node . nodePrincipal ;
52- pr = Cc [ "@mozilla.org/scriptsecuritymanager;1" ] .
53- getService ( Ci . nsIScriptSecurityManager ) .
54- getAppCodebasePrincipal ( pr . URI ,
55- pr . appId ,
56- pr . isInBrowserElement ) ;
57- if ( pr . checkMayLoad . length == 3 ) {
58- pr . checkMayLoad ( tryLoadUri , false , false ) ;
59- }
60- else {
61- pr . checkMayLoad ( tryLoadUri , false ) ;
62- }
63- return true ;
64- }
65- catch ( ex ) {
66- log ( LOG_DEBUG , "denied load of " + ( tryLoadUri . spec || tryLoadUri ) , ex ) ;
67- return false ;
68- }
69- } ;
70-
7143const createFrame = ( window , src , allowScripts , loadFun ) => {
7244 log ( LOG_INFO , "creating frame for " + src ) ;
7345 let frame = window . document . createElement ( "iframe" ) ;
@@ -416,9 +388,6 @@ Repaginator.prototype = {
416388 }
417389
418390 var doc = element . contentDocument ;
419- if ( ! checkSameOrigin ( ownerDoc , doc . defaultView . location ) ) {
420- throw new Error ( "not in the same origin anymore" ) ;
421- }
422391 this . pageCount ++ ;
423392
424393 // Remove scripts from frame
0 commit comments