Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buildable in closure save -> saveValue API change #103

Merged
merged 3 commits into from
Apr 13, 2017
Merged

Conversation

e111077
Copy link
Contributor

@e111077 e111077 commented Apr 13, 2017

Please review DO NOT MERGE

This builds with closure and passes presubmit things

@@ -240,8 +242,8 @@
port.addEventListener('message', function(event) {
this.handleClientMessage(event, port)
}.bind(this));

if (!(port in this[CLIENT_PORTS])) {
let isPortInClient = port.toString() in this[CLIENT_PORTS];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let => var

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uhhhhhh

@@ -307,7 +309,7 @@
}
};

self.appIndexedDBMirrorWorker = new AppIndexedDBMirrorWorker();
self.appIndexedDBMirrorWorker = new AppIndexedDBMirrorWorker('', '');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just annotate the constructor to suggest that there are defaults set internally?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes we can

@@ -181,7 +181,7 @@
* Worker spawned from `workerUrl`.
*/
client: {
type: Polymer.AppIndexedDBMirrorClient,
type: Object,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But why...? This is less accurate 😢

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It didn't like pointing to that. it kept saying that object was undefined

@@ -253,7 +248,7 @@
this.persistedData = this.data;
this.linkPaths('data', 'persistedData');
} else {
this.unlinkPaths('data', 'persistedData');
this.unlinkPaths('data');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -49,5 +49,5 @@
}
}.bind(this));

self.importScripts([workerScript]);
self.importScripts(workerScript);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a small (JavaScript) miracle that this ever worked...

@@ -95,10 +98,10 @@
* A proxy method that forwards all calls to the backing `WebWorker`
* instance.
*
* @param {...} removeEventListenerArgs The arguments to call the same
* @param {Array} removeEventListenerArgs The arguments to call the same
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is right.

@e111077
Copy link
Contributor Author

e111077 commented Apr 13, 2017

@cdata i got it!

@@ -98,7 +101,7 @@
* @param {...} removeEventListenerArgs The arguments to call the same
* method on the `WebWorker` with.
*/
removeEventListener: function() {
removeEventListener: function(removeEventListenerArgs) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove removeEventListenerArgs?

Copy link
Contributor

@cdata cdata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One missed detail

@e111077
Copy link
Contributor Author

e111077 commented Apr 13, 2017

@cdata double checked and it builds just fine

@cdata
Copy link
Contributor

cdata commented Apr 13, 2017

LGTM 👍

@e111077 e111077 merged commit 67bf12b into master Apr 13, 2017
@e111077 e111077 deleted the closure-buildable branch April 13, 2017 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants