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

window.location.href and handleEvent #190

Closed
monolighter opened this issue Nov 16, 2012 · 11 comments
Closed

window.location.href and handleEvent #190

monolighter opened this issue Nov 16, 2012 · 11 comments
Labels
Milestone

Comments

@monolighter
Copy link

After changing window.location.href webkit goes down, also writes
'Uncaught TypeError: Cannot read property 'handleEvent' of null'
In my app i need to load specific OAuth page in new Window to login, after it changes his location webkit goes down and i simply can't close this new Window.

@rogerwang
Copy link
Member

Did you do that from the Node context? I can reproduce some error but I'm not sure it's the same error as yours. Can you post your code so I can run it here?

Thanks.

@monolighter
Copy link
Author

$("#VKlogin").on('click', function(){ var tmpVKwin = gui.Window.get(VKauth = window.open(text)); })

Thats all, and then in new window script going to change his location, after this any event goes down.

@rogerwang
Copy link
Member

I'm still not sure what happened on your side. Could you please provide the full code so I can run it here? Thanks in advance.

@monolighter
Copy link
Author

Upper script open new webkit Window with some url like "http://example.com" which contains auth form. After submitting script, we goes to another location "http://oath.example.com?login=success" and this webkit Window goes to denial in any js event.
Another words

  1. We open new webkit window require('nw.gui').Window.get(window.open(url))
  2. In this new window launches some window.location.href='anotherUrl'
  3. This new window goes to denial.

@rogerwang
Copy link
Member

Can you provide source code rather than description?

monolighter notifications@github.com wrote:

Upper script open new webkit Window with some url like
"http://example.com" which contains auth form. After submitting script,
we goes to another location "http://oath.example.com?login=success" and
this webkit Window goes to denial in any js event.
Another words

  1. We open new webkit window
    require('nw.gui').Window.get(window.open(url))
  2. In this new window launches some window.location.href='anotherUrl'
  3. This new window goes to denial.

Reply to this email directly or view it on GitHub:
#190 (comment)

抱歉暂时无法详细说明。这份邮件是使用安装有K-9 Mail的Android移动设备发送的。

@monolighter
Copy link
Author

Okay. Later. Not home.

@zhchbin
Copy link
Contributor

zhchbin commented Nov 17, 2012

@monolighter
Is the bug like this code: https://gist.github.com/55637eb2e5dc5348fd62
I just reproduce the bug as your description.

@rogerwang
Copy link
Member

@zcbenz , @zhchbin 's case failed in the native UI implementation, please fix it.
#0 base::debug::BreakDebugger () at ../../base/debug/debugger_posix.cc:243
#1 0x0000000002881d4b in logging::LogMessage::~LogMessage (
this=0x7fffffff7900, __in_chrg=)
at ../../base/logging.cc:649
#2 0x000000000183a341 in api::(anonymous namespace)::GetCurrentRenderView ()
at ../../content/nw/src/api/dispatcher_bindings.cc:55
#3 0x000000000183bf4e in api::DispatcherBindings::DeallocateObject (args=...)
at ../../content/nw/src/api/dispatcher_bindings.cc:301
#4 0x0000000001f22520 in v8::internal::HandleApiCallHelper (args=...,
isolate=0x7ffff7e3b000) at ../../v8/src/builtins.cc:1146
#5 0x0000000001f1d31f in v8::internal::Builtin_Impl_HandleApiCall (args=...,
isolate=0x7ffff7e3b000) at ../../v8/src/builtins.cc:1164
#6 0x0000000001f1d2f0 in v8::internal::Builtin_HandleApiCall (args=...,
isolate=0x7ffff7e3b000) at ../../v8/src/builtins.cc:1163

@ghost ghost assigned zcbenz Nov 18, 2012
@zcbenz
Copy link
Contributor

zcbenz commented Nov 18, 2012

I need to refactor the API implementation, currently everything is stored in DOM's window object, I will store API's Window object in node's context.

zcbenz added a commit that referenced this issue Nov 29, 2012
@zcbenz
Copy link
Contributor

zcbenz commented Nov 29, 2012

The Window API is now independent of window context, fix will be shipped in v0.3.5

@zcbenz zcbenz closed this as completed Nov 29, 2012
@rogerwang
Copy link
Member

we should add test case for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants