Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Live development refactoring #1396

Merged
merged 6 commits into from
Aug 17, 2012
Merged

Live development refactoring #1396

merged 6 commits into from
Aug 17, 2012

Conversation

jdiehl
Copy link
Contributor

@jdiehl jdiehl commented Aug 17, 2012

As suggested in #1340:

  • Inspector and agents now use jQuery events. I mapped Inspector.on and .off to jQuery's methods to make migrating to the new events easier. Feel free to take these methods out (they are not used).
  • LiveDevelopment.open() now returns a promise
  • I removed the load event handler (it is triggered otherwise)
  • Status codes are now constants (the mapping remains the same to support >= STATUS_CONNECTING to check if there is an connection attempt or an active connection in one line)

…oaded from LiveDevelopment, which is independent of the Inspector)
Inspector events are now dispatched via $(Inspector.Domain), Agent events are dispatched via the agent.
@ghost ghost assigned jasonsanjose Aug 17, 2012
@jasonsanjose
Copy link
Member

I'm seeing 1 unit test failure in Live Development "should establish a browser connection for an opened html file"

Error: An attempt was made to use an object that is not, or is no longer, usable.
    at _send (file://localhost/Users/jasonsj/Github/brackets-app/brackets/src/LiveDevelopment/Inspector/Inspector.js:143:17)
    at Object.close (file://localhost/Users/jasonsj/Github/brackets-app/brackets/src/LiveDevelopment/LiveDevelopment.js:443:31)
    at cssOpened (file://localhost/Users/jasonsj/Github/brackets-app/brackets/test/spec/LiveDevelopment-test.js:124:33)
    at jasmine.Block.execute (file://localhost/Users/jasonsj/Github/brackets-app/brackets/test/thirdparty/jasmine-core/jasmine.js:1024:15)
    at jasmine.Queue.next_ (file://localhost/Users/jasonsj/Github/brackets-app/brackets/test/thirdparty/jasmine-core/jasmine.js:1842:31)
    at goAgain (file://localhost/Users/jasonsj/Github/brackets-app/brackets/test/thirdparty/jasmine-core/jasmine.js:1832:18)

timeout: timed out after 10000 msec waiting for Waiting for to close inspector

@jdiehl
Copy link
Contributor Author

jdiehl commented Aug 17, 2012

I do not get this error, and do not understand how it can occur. The variable in question (Inspector.js:143:17) is method, which is not an object but a string. The call that is issued is window.close() on the client side to close the active tab after a live development session. Can you try closing an active live development session manually and verify that the error actually occurs?

Other than that, I am not sure how I can help in fixing this issue.

On Aug 17, 2012, at 19:03 , Jason San Jose notifications@github.com wrote:

I'm seeing 1 unit test failure in Live Development "should establish a browser connection for an opened html file"

Error: An attempt was made to use an object that is not, or is no longer, usable.
at send (file://localhost/Users/jasonsj/Github/brackets-app/brackets/src/LiveDevelopment/Inspector/Inspector.js:143:17)
at Object.close (file://localhost/Users/jasonsj/Github/brackets-app/brackets/src/LiveDevelopment/LiveDevelopment.js:443:31)
at cssOpened (file://localhost/Users/jasonsj/Github/brackets-app/brackets/test/spec/LiveDevelopment-test.js:124:33)
at jasmine.Block.execute (file://localhost/Users/jasonsj/Github/brackets-app/brackets/test/thirdparty/jasmine-core/jasmine.js:1024:15)
at jasmine.Queue.next
(file://localhost/Users/jasonsj/Github/brackets-app/brackets/test/thirdparty/jasmine-core/jasmine.js:1842:31)
at goAgain (file://localhost/Users/jasonsj/Github/brackets-app/brackets/test/thirdparty/jasmine-core/jasmine.js:1832:18)

timeout: timed out after 10000 msec waiting for Waiting for to close inspector

Reply to this email directly or view it on GitHub.

@@ -28,20 +28,6 @@
{ "name": "object", "$ref": "Runtime.RemoteObject" },
Copy link
Member

Choose a reason for hiding this comment

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

Interesting that the version number at the top of this object isn't updated. Just to document the diff, whats the origin and rev of this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Origin is WebKit: http://svn.webkit.org/repository/webkit/trunk/Source/WebCore/inspector/Inspector.json
(the link can be found in jsdoc.rb)

That is all the info, I have.

@jasonsanjose
Copy link
Member

Looks good. I wasn't able to reproduce the unit test failure once I closed chrome before launching the tests. Merging. Thanks for the bug fix!

jasonsanjose added a commit that referenced this pull request Aug 17, 2012
@jasonsanjose jasonsanjose merged commit 6b9833e into adobe:master Aug 17, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants