Skip to content

Commit a5ad0c1

Browse files
committed
Aaand fix IE8 again
1 parent 7983ee0 commit a5ad0c1

File tree

8 files changed

+17
-17
lines changed

8 files changed

+17
-17
lines changed

dist/protobuf.js

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/protobuf.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/protobuf.min.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/protobuf.min.js.gz

-6 Bytes
Binary file not shown.

dist/protobuf.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/class.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Class.create = function create(type, ctor) {
4545
var prototype = clazz.prototype = new Message();
4646
prototype.constructor = clazz;
4747

48-
// Static methods on Message are instance methods on Class and vice-versa.
48+
// Static methods on Message are instance methods on Class and vice versa.
4949
util.merge(clazz, Message, true);
5050

5151
// Classes and messages reference their reflected type
@@ -65,7 +65,7 @@ Class.create = function create(type, ctor) {
6565
: field.defaultValue;
6666
});
6767

68-
// Runtime messages have non-enumerable getters and setters for each virtual oneof field
68+
// Messages have non-enumerable getters and setters for each virtual oneof field
6969
type.getOneofsArray().forEach(function(oneof) {
7070
util.prop(prototype, oneof.resolve().name, {
7171
get: function getVirtual() {
@@ -86,12 +86,12 @@ Class.create = function create(type, ctor) {
8686
});
8787

8888
// Register
89-
type.ctor = clazz;
89+
type.setCtor(clazz);
9090

9191
return prototype;
9292
};
9393

94-
// Static methods on Message are instance methods on Class and vice-versa.
94+
// Static methods on Message are instance methods on Class and vice versa.
9595
Class.prototype = Message;
9696

9797
/**

src/type.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ util.props(TypePrototype, {
161161
},
162162
set: function setCtor(ctor) {
163163
if (ctor && !(ctor.prototype instanceof Message))
164-
throw util._TypeError("ctor", "a constructor inheriting from Message");
164+
throw util._TypeError("ctor", "a Message constructor");
165165
this._ctor = ctor;
166166
}
167167
}

tests/classes.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ tape.test("google.protobuf.Any class", function(test) {
1515
function Any(properties) {
1616
Message.call(this, properties);
1717
}
18-
Any.prototype = Class.create(root.lookup("google.protobuf.Any"), Any);
18+
/* Any.prototype = */ Class.create(root.lookup("google.protobuf.Any"), Any);
1919

2020
var valueBuffer = protobuf.util.newBuffer(0);
2121
var any = new Any({

0 commit comments

Comments
 (0)