OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 throwTypeError(isolate); \ | 69 throwTypeError(isolate); \ |
70 return; \ | 70 return; \ |
71 } \ | 71 } \ |
72 } | 72 } |
73 | 73 |
74 #define V8TRYCATCH_FOR_V8STRINGRESOURCE_RETURN(type, var, value, retVal) \ | 74 #define V8TRYCATCH_FOR_V8STRINGRESOURCE_RETURN(type, var, value, retVal) \ |
75 type var(value); \ | 75 type var(value); \ |
76 if (!var.prepare()) \ | 76 if (!var.prepare()) \ |
77 return retVal; | 77 return retVal; |
78 | 78 |
79 #define V8TRYCATCH_FOR_V8STRINGRESOURCE(type, var, value) \ | |
80 V8TRYCATCH_FOR_V8STRINGRESOURCE_RETURN(type, var, value, v8::Undefined()); | |
81 | |
82 #define V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(type, var, value) \ | 79 #define V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(type, var, value) \ |
83 type var(value); \ | 80 type var(value); \ |
84 if (!var.prepare()) \ | 81 if (!var.prepare()) \ |
85 return; | 82 return; |
86 | 83 |
87 } // namespace WebCore | 84 } // namespace WebCore |
88 | 85 |
89 #endif // V8BindingMacros_h | 86 #endif // V8BindingMacros_h |
OLD | NEW |