Skip to content

Commit aacbf97

Browse files
committed
Merge pull request #3084 from rharkeadsk/dev/embind-closure
Update embind to work with the Closure Compiler
2 parents d49c338 + 1ea1a63 commit aacbf97

File tree

4 files changed

+1910
-1072
lines changed

4 files changed

+1910
-1072
lines changed

src/embind/embind.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2098,29 +2098,29 @@ var LibraryEmbind = {
20982098
Object.defineProperty(this, '__parent', {
20992099
value: wrapperPrototype
21002100
});
2101-
this.__construct.apply(this, arraySlice.call(arguments));
2101+
this["__construct"].apply(this, arraySlice.call(arguments));
21022102
});
21032103

21042104
// It's a little nasty that we're modifying the wrapper prototype here.
21052105

2106-
wrapperPrototype.__construct = function __construct() {
2106+
wrapperPrototype["__construct"] = function __construct() {
21072107
if (this === wrapperPrototype) {
21082108
throwBindingError("Pass correct 'this' to __construct");
21092109
}
21102110

2111-
var inner = baseConstructor.implement.apply(
2111+
var inner = baseConstructor["implement"].apply(
21122112
undefined,
21132113
[this].concat(arraySlice.call(arguments)));
21142114
var $$ = inner.$$;
2115-
inner.notifyOnDestruction();
2115+
inner["notifyOnDestruction"]();
21162116
$$.preservePointerOnDelete = true;
2117-
Object.defineProperty(this, '$$', {
2117+
Object.defineProperties(this, { $$: {
21182118
value: $$
2119-
});
2119+
}});
21202120
registerInheritedInstance(registeredClass, $$.ptr, this);
21212121
};
21222122

2123-
wrapperPrototype.__destruct = function __destruct() {
2123+
wrapperPrototype["__destruct"] = function __destruct() {
21242124
if (this === wrapperPrototype) {
21252125
throwBindingError("Pass correct 'this' to __destruct");
21262126
}

0 commit comments

Comments
 (0)