| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 return m_private->name(); | 60 return m_private->name(); |
| 61 } | 61 } |
| 62 | 62 |
| 63 WebString WebDOMError::message() const | 63 WebString WebDOMError::message() const |
| 64 { | 64 { |
| 65 if (!m_private.get()) | 65 if (!m_private.get()) |
| 66 return WebString(); | 66 return WebString(); |
| 67 return m_private->message(); | 67 return m_private->message(); |
| 68 } | 68 } |
| 69 | 69 |
| 70 v8::Local<v8::Value> WebDOMError::toV8Value(v8::Local<v8::Object> /* creationCo
ntext */, v8::Isolate* isolate) | 70 v8::Local<v8::Value> WebDOMError::toV8Value(v8::Local<v8::Object> creationConte
xt, v8::Isolate* isolate) |
| 71 { | 71 { |
| 72 // We no longer use |creationContext| because it's often misused and points | 72 // We no longer use |creationContext| because it's often misused and points |
| 73 // to a context faked by user script. | 73 // to a context faked by user script. |
| 74 ASSERT(creationContext->CreationContext() == isolate->GetCurrentContext()); |
| 74 if (!m_private.get()) | 75 if (!m_private.get()) |
| 75 return v8::Local<v8::Value>(); | 76 return v8::Local<v8::Value>(); |
| 76 return toV8(m_private.get(), isolate->GetCurrentContext()->Global(), isolate
); | 77 return toV8(m_private.get(), isolate->GetCurrentContext()->Global(), isolate
); |
| 77 } | 78 } |
| 78 | 79 |
| 79 WebDOMError::WebDOMError(DOMError* error) | 80 WebDOMError::WebDOMError(DOMError* error) |
| 80 : m_private(error) | 81 : m_private(error) |
| 81 { | 82 { |
| 82 } | 83 } |
| 83 | 84 |
| 84 WebDOMError& WebDOMError::operator=(DOMError* error) | 85 WebDOMError& WebDOMError::operator=(DOMError* error) |
| 85 { | 86 { |
| 86 m_private = error; | 87 m_private = error; |
| 87 return *this; | 88 return *this; |
| 88 } | 89 } |
| 89 | 90 |
| 90 } // namespace blink | 91 } // namespace blink |
| OLD | NEW |