OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007-2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2007-2009 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 27 matching lines...) Expand all Loading... |
38 #include "core/html/HTMLFrameElement.h" | 38 #include "core/html/HTMLFrameElement.h" |
39 #include "core/html/parser/HTMLParserIdioms.h" | 39 #include "core/html/parser/HTMLParserIdioms.h" |
40 | 40 |
41 namespace WebCore { | 41 namespace WebCore { |
42 | 42 |
43 using namespace HTMLNames; | 43 using namespace HTMLNames; |
44 | 44 |
45 void V8HTMLFrameElement::locationAttributeSetterCustom(v8::Local<v8::Value> valu
e, const v8::PropertyCallbackInfo<void>& info) | 45 void V8HTMLFrameElement::locationAttributeSetterCustom(v8::Local<v8::Value> valu
e, const v8::PropertyCallbackInfo<void>& info) |
46 { | 46 { |
47 HTMLFrameElement* frame = V8HTMLFrameElement::toNative(info.Holder()); | 47 HTMLFrameElement* frame = V8HTMLFrameElement::toNative(info.Holder()); |
48 String locationValue = toWebCoreStringWithNullCheck(value); | 48 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, locati
onValue, value); |
49 | 49 |
50 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); | 50 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); |
51 if (protocolIsJavaScript(stripLeadingAndTrailingHTMLSpaces(locationValue)) &
& !BindingSecurity::shouldAllowAccessToFrame(frame->contentFrame(), exceptionSta
te)) { | 51 if (protocolIsJavaScript(stripLeadingAndTrailingHTMLSpaces(locationValue)) &
& !BindingSecurity::shouldAllowAccessToFrame(frame->contentFrame(), exceptionSta
te)) { |
52 exceptionState.throwIfNeeded(); | 52 exceptionState.throwIfNeeded(); |
53 return; | 53 return; |
54 } | 54 } |
55 | 55 |
56 frame->setLocation(locationValue); | 56 frame->setLocation(locationValue); |
57 } | 57 } |
58 | 58 |
59 } // namespace WebCore | 59 } // namespace WebCore |
OLD | NEW |