Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Side by Side Diff: Source/web/WebDOMError.cpp

Issue 1166793006: bindings: Stop using the given creationContext in public APIs. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/web/WebBlob.cpp ('k') | Source/web/WebDOMFileSystem.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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> creationConte xt, v8::Isolate* isolate) 70 v8::Local<v8::Value> WebDOMError::toV8Value(v8::Local<v8::Object> /* creationCo ntext */, v8::Isolate* isolate)
71 { 71 {
72 // We no longer use |creationContext| because it's often misused and points
73 // to a context faked by user script.
72 if (!m_private.get()) 74 if (!m_private.get())
73 return v8::Local<v8::Value>(); 75 return v8::Local<v8::Value>();
74 return toV8(m_private.get(), creationContext, isolate); 76 return toV8(m_private.get(), isolate->GetCurrentContext()->Global(), isolate );
75 } 77 }
76 78
77 WebDOMError::WebDOMError(DOMError* error) 79 WebDOMError::WebDOMError(DOMError* error)
78 : m_private(error) 80 : m_private(error)
79 { 81 {
80 } 82 }
81 83
82 WebDOMError& WebDOMError::operator=(DOMError* error) 84 WebDOMError& WebDOMError::operator=(DOMError* error)
83 { 85 {
84 m_private = error; 86 m_private = error;
85 return *this; 87 return *this;
86 } 88 }
87 89
88 } // namespace blink 90 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebBlob.cpp ('k') | Source/web/WebDOMFileSystem.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698