Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Side by Side Diff: Source/bindings/v8/custom/V8WindowCustom.cpp

Issue 98853012: Revert of Remove uses of deprecated toWebCoreStringWithUndefinedOrNullCheck(v8::Handle<v8::Value>) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp ('k') | Source/core/inspector/JavaScriptCallFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698