| 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, v
8::Isolate* isolate) | 82 v8::Local<v8::Value> WebBlob::toV8Value(v8::Local<v8::Object> /* creationContext
*/, v8::Isolate* isolate) |
| 83 { | 83 { |
| 84 // We no longer use |creationContext| because it's often misused and points |
| 85 // to a context faked by user script. |
| 84 if (!m_private.get()) | 86 if (!m_private.get()) |
| 85 return v8::Local<v8::Value>(); | 87 return v8::Local<v8::Value>(); |
| 86 return toV8(m_private.get(), creationContext, isolate); | 88 return toV8(m_private.get(), isolate->GetCurrentContext()->Global(), isolate
); |
| 87 } | 89 } |
| 88 | 90 |
| 89 WebBlob::WebBlob(Blob* blob) | 91 WebBlob::WebBlob(Blob* blob) |
| 90 : m_private(blob) | 92 : m_private(blob) |
| 91 { | 93 { |
| 92 } | 94 } |
| 93 | 95 |
| 94 WebBlob& WebBlob::operator=(Blob* blob) | 96 WebBlob& WebBlob::operator=(Blob* blob) |
| 95 { | 97 { |
| 96 m_private = blob; | 98 m_private = blob; |
| 97 return *this; | 99 return *this; |
| 98 } | 100 } |
| 99 | 101 |
| 100 } // namespace blink | 102 } // namespace blink |
| OLD | NEW |