|
|
|
|
| 1141 |
mBody.swap(aBody); |
1141 |
mBody.swap(aBody); |
| 1142 |
mClonedObjects.SwapElements(aClonedObjects); |
1142 |
mClonedObjects.SwapElements(aClonedObjects); |
| 1143 |
} |
1143 |
} |
| 1144 |
|
1144 |
|
| 1145 |
nsresult |
1145 |
nsresult |
| 1146 |
MainThreadRun() |
1146 |
MainThreadRun() |
| 1147 |
{ |
1147 |
{ |
| 1148 |
nsCOMPtr<nsIVariant> variant; |
1148 |
nsCOMPtr<nsIVariant> variant; |
| 1149 |
RuntimeService::AutoSafeJSContext cx; |
|
|
| 1150 |
|
1149 |
|
| 1151 |
if (mBody.data()) { |
1150 |
if (mBody.data()) { |
|
|
1151 |
RuntimeService::AutoSafeJSContext cx; |
| 1152 |
nsIXPConnect* xpc = nsContentUtils::XPConnect(); |
1152 |
nsIXPConnect* xpc = nsContentUtils::XPConnect(); |
| 1153 |
NS_ASSERTION(xpc, "This should never be null!"); |
1153 |
NS_ASSERTION(xpc, "This should never be null!"); |
| 1154 |
|
1154 |
|
| 1155 |
nsresult rv = NS_OK; |
1155 |
nsresult rv = NS_OK; |
| 1156 |
|
1156 |
|
| 1157 |
JSStructuredCloneCallbacks* callbacks = |
1157 |
JSStructuredCloneCallbacks* callbacks = |
| 1158 |
mWorkerPrivate->IsChromeWorker() ? |
1158 |
mWorkerPrivate->IsChromeWorker() ? |
| 1159 |
ChromeWorkerStructuredCloneCallbacks(true) : |
1159 |
ChromeWorkerStructuredCloneCallbacks(true) : |