| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 | 359 |
| 360 void V8Window::showModalDialogMethodCustom(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 360 void V8Window::showModalDialogMethodCustom(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
| 361 { | 361 { |
| 362 DOMWindow* impl = V8Window::toNative(info.Holder()); | 362 DOMWindow* impl = V8Window::toNative(info.Holder()); |
| 363 ExceptionState exceptionState(ExceptionState::ExecutionContext, "showModalDi
alog", "Window", info.Holder(), info.GetIsolate()); | 363 ExceptionState exceptionState(ExceptionState::ExecutionContext, "showModalDi
alog", "Window", info.Holder(), info.GetIsolate()); |
| 364 if (!BindingSecurity::shouldAllowAccessToFrame(impl->frame(), exceptionState
)) { | 364 if (!BindingSecurity::shouldAllowAccessToFrame(impl->frame(), exceptionState
)) { |
| 365 exceptionState.throwIfNeeded(); | 365 exceptionState.throwIfNeeded(); |
| 366 return; | 366 return; |
| 367 } | 367 } |
| 368 | 368 |
| 369 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe
ck>, urlString, info[0]); | 369 // FIXME: Handle exceptions properly. |
| 370 String urlString = toWebCoreStringWithUndefinedOrNullCheck(info[0]); |
| 370 DialogHandler handler(info[1]); | 371 DialogHandler handler(info[1]); |
| 371 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe
ck>, dialogFeaturesString, info[2]); | 372 String dialogFeaturesString = toWebCoreStringWithUndefinedOrNullCheck(info[2
]); |
| 372 | 373 |
| 373 impl->showModalDialog(urlString, dialogFeaturesString, activeDOMWindow(), fi
rstDOMWindow(), setUpDialog, &handler); | 374 impl->showModalDialog(urlString, dialogFeaturesString, activeDOMWindow(), fi
rstDOMWindow(), setUpDialog, &handler); |
| 374 | 375 |
| 375 v8SetReturnValue(info, handler.returnValue(info.GetIsolate())); | 376 v8SetReturnValue(info, handler.returnValue(info.GetIsolate())); |
| 376 } | 377 } |
| 377 | 378 |
| 378 void V8Window::openMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info) | 379 void V8Window::openMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 379 { | 380 { |
| 380 DOMWindow* impl = V8Window::toNative(info.Holder()); | 381 DOMWindow* impl = V8Window::toNative(info.Holder()); |
| 381 ExceptionState exceptionState(ExceptionState::ExecutionContext, "open", "Win
dow", info.Holder(), info.GetIsolate()); | 382 ExceptionState exceptionState(ExceptionState::ExecutionContext, "open", "Win
dow", info.Holder(), info.GetIsolate()); |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 v8::Handle<v8::Context> context = frame->script().currentWorldContext(); | 566 v8::Handle<v8::Context> context = frame->script().currentWorldContext(); |
| 566 if (context.IsEmpty()) | 567 if (context.IsEmpty()) |
| 567 return v8Undefined(); | 568 return v8Undefined(); |
| 568 | 569 |
| 569 v8::Handle<v8::Object> global = context->Global(); | 570 v8::Handle<v8::Object> global = context->Global(); |
| 570 ASSERT(!global.IsEmpty()); | 571 ASSERT(!global.IsEmpty()); |
| 571 return global; | 572 return global; |
| 572 } | 573 } |
| 573 | 574 |
| 574 } // namespace WebCore | 575 } // namespace WebCore |
| OLD | NEW |