| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 m_private = other.m_private; | 72 m_private = other.m_private; |
| 73 } | 73 } |
| 74 | 74 |
| 75 WebString WebBlob::uuid() | 75 WebString WebBlob::uuid() |
| 76 { | 76 { |
| 77 if (!m_private.get()) | 77 if (!m_private.get()) |
| 78 return WebString(); | 78 return WebString(); |
| 79 return m_private->uuid(); | 79 return m_private->uuid(); |
| 80 } | 80 } |
| 81 | 81 |
| 82 v8::Local<v8::Value> WebBlob::toV8Value(v8::Local<v8::Object> /* creationContext
*/, v8::Isolate* isolate) | 82 v8::Local<v8::Value> WebBlob::toV8Value(v8::Local<v8::Object> creationContext, v
8::Isolate* isolate) |
| 83 { | 83 { |
| 84 // We no longer use |creationContext| because it's often misused and points | 84 // We no longer use |creationContext| because it's often misused and points |
| 85 // to a context faked by user script. | 85 // to a context faked by user script. |
| 86 ASSERT(creationContext->CreationContext() == isolate->GetCurrentContext()); |
| 86 if (!m_private.get()) | 87 if (!m_private.get()) |
| 87 return v8::Local<v8::Value>(); | 88 return v8::Local<v8::Value>(); |
| 88 return toV8(m_private.get(), isolate->GetCurrentContext()->Global(), isolate
); | 89 return toV8(m_private.get(), isolate->GetCurrentContext()->Global(), isolate
); |
| 89 } | 90 } |
| 90 | 91 |
| 91 WebBlob::WebBlob(Blob* blob) | 92 WebBlob::WebBlob(Blob* blob) |
| 92 : m_private(blob) | 93 : m_private(blob) |
| 93 { | 94 { |
| 94 } | 95 } |
| 95 | 96 |
| 96 WebBlob& WebBlob::operator=(Blob* blob) | 97 WebBlob& WebBlob::operator=(Blob* blob) |
| 97 { | 98 { |
| 98 m_private = blob; | 99 m_private = blob; |
| 99 return *this; | 100 return *this; |
| 100 } | 101 } |
| 101 | 102 |
| 102 } // namespace blink | 103 } // namespace blink |
| OLD | NEW |