File tree Expand file tree Collapse file tree 2 files changed +950
-935
lines changed Expand file tree Collapse file tree 2 files changed +950
-935
lines changed Original file line number Diff line number Diff line change @@ -582,7 +582,7 @@ class Interface {
582
582
}
583
583
}
584
584
585
- generateLegacyProxy ( ) {
585
+ generateLegacyProxyHandler ( ) {
586
586
const hasIndexedSetter = this . indexedSetter !== null ;
587
587
const hasNamedSetter = this . namedSetter !== null ;
588
588
const hasNamedDeleter = this . namedDeleter !== null ;
@@ -694,7 +694,7 @@ class Interface {
694
694
} ;
695
695
696
696
this . str += `
697
- obj = new Proxy(obj, {
697
+ const proxyHandler = {
698
698
` ;
699
699
700
700
// [[Get]] (necessary because of proxy semantics)
@@ -1094,7 +1094,7 @@ class Interface {
1094
1094
` ;
1095
1095
1096
1096
this . str += `
1097
- }) ;
1097
+ };
1098
1098
` ;
1099
1099
}
1100
1100
@@ -1142,7 +1142,9 @@ class Interface {
1142
1142
` ;
1143
1143
1144
1144
if ( this . isLegacyPlatformObj ) {
1145
- this . generateLegacyProxy ( ) ;
1145
+ this . str += `
1146
+ obj = new Proxy(obj, proxyHandler);
1147
+ ` ;
1146
1148
}
1147
1149
1148
1150
this . str += `
@@ -1456,6 +1458,9 @@ class Interface {
1456
1458
this . generateExport ( ) ;
1457
1459
this . generateIface ( ) ;
1458
1460
this . generateInstall ( ) ;
1461
+ if ( this . isLegacyPlatformObj ) {
1462
+ this . generateLegacyProxyHandler ( ) ;
1463
+ }
1459
1464
1460
1465
this . generateMixins ( ) ;
1461
1466
this . generateRequires ( ) ;
You can’t perform that action at this time.
0 commit comments