| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2009, 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2008, 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 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 return; | 513 return; |
| 514 // FIXME: Consider passing StringImpl directly. | 514 // FIXME: Consider passing StringImpl directly. |
| 515 AtomicString name = toCoreAtomicString(property.As<v8::String>()); | 515 AtomicString name = toCoreAtomicString(property.As<v8::String>()); |
| 516 HTMLDocument* htmlDocument = V8HTMLDocument::toImpl(info.Holder()); | 516 HTMLDocument* htmlDocument = V8HTMLDocument::toImpl(info.Holder()); |
| 517 ASSERT(htmlDocument); | 517 ASSERT(htmlDocument); |
| 518 v8::Local<v8::Value> result = getNamedProperty(htmlDocument, name, info.Hold
er(), info.GetIsolate()); | 518 v8::Local<v8::Value> result = getNamedProperty(htmlDocument, name, info.Hold
er(), info.GetIsolate()); |
| 519 if (!result.IsEmpty()) { | 519 if (!result.IsEmpty()) { |
| 520 v8SetReturnValue(info, result); | 520 v8SetReturnValue(info, result); |
| 521 return; | 521 return; |
| 522 } | 522 } |
| 523 v8::Local<v8::Value> prototype = info.Holder()->GetPrototype(); | 523 v8::Local<v8::Value> value; |
| 524 if (prototype->IsObject()) { | 524 if (info.Holder()->GetRealNamedPropertyInPrototypeChain(info.GetIsolate()->G
etCurrentContext(), property.As<v8::String>()).ToLocal(&value)) |
| 525 v8::Local<v8::Value> value; | 525 v8SetReturnValue(info, value); |
| 526 if (prototype.As<v8::Object>()->Get(info.GetIsolate()->GetCurrentContext
(), property).ToLocal(&value)) | |
| 527 v8SetReturnValue(info, value); | |
| 528 } | |
| 529 } | 526 } |
| 530 | 527 |
| 531 void WindowProxy::namedItemAdded(HTMLDocument* document, const AtomicString& nam
e) | 528 void WindowProxy::namedItemAdded(HTMLDocument* document, const AtomicString& nam
e) |
| 532 { | 529 { |
| 533 ASSERT(m_world->isMainWorld()); | 530 ASSERT(m_world->isMainWorld()); |
| 534 | 531 |
| 535 if (!isContextInitialized() || !m_scriptState->contextIsValid()) | 532 if (!isContextInitialized() || !m_scriptState->contextIsValid()) |
| 536 return; | 533 return; |
| 537 | 534 |
| 538 ScriptState::Scope scope(m_scriptState.get()); | 535 ScriptState::Scope scope(m_scriptState.get()); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 561 } | 558 } |
| 562 | 559 |
| 563 void WindowProxy::updateSecurityOrigin(SecurityOrigin* origin) | 560 void WindowProxy::updateSecurityOrigin(SecurityOrigin* origin) |
| 564 { | 561 { |
| 565 if (!isContextInitialized()) | 562 if (!isContextInitialized()) |
| 566 return; | 563 return; |
| 567 setSecurityToken(origin); | 564 setSecurityToken(origin); |
| 568 } | 565 } |
| 569 | 566 |
| 570 } // namespace blink | 567 } // namespace blink |
| OLD | NEW |