Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding protocol.RequestBufferJob api #1208

Merged
merged 1 commit into from
Mar 20, 2015
Merged

Conversation

deepak1556
Copy link
Member

Need to work on the crashing tests

v8::Local<v8::Object> buffer);

// URLRequestSimpleJob:
int GetData(std::string* mime_type,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not safe to store binary data in std::string, you should override GetRefCountedData instead of GetData.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zcbenz url_request_simple_job.h in libchromium has GetData implemented as pure virtual method and there is no GetRefCountedData virtual method to override, which is different from https://code.google.com/p/chromium/codesearch#chromium/src/net/url_request/url_request_simple_job.h&q=url_request_simple&sq=package:chromium&l=55 . Are we on an old version ? GetRefCountedData seems to have been implemented https://code.google.com/p/chromium/issues/detail?id=422489 here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah GetRefCountedData is not available until Chrome 41, I think we can revisit this after #1243 is finished.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@deepak1556 deepak1556 force-pushed the protocol branch 2 times, most recently from 509528d to 37f7a27 Compare March 18, 2015 13:14
@deepak1556
Copy link
Member Author

works after the upgrade to 41, any comments @zcbenz ?

@@ -10,6 +10,7 @@
#include "base/memory/weak_ptr.h"
#include "net/url_request/url_request_job.h"
#include "net/url_request/url_request_job_factory.h"
#include "atom/common/node_includes.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should include v8.h here, node_includes.h should only be used when you use APIs in node.h, because node_includes.h did many hacks to make it possible.

@deepak1556
Copy link
Member Author

fixed, thanks!

@zcbenz
Copy link
Contributor

zcbenz commented Mar 20, 2015

zcbenz added a commit that referenced this pull request Mar 20, 2015
adding protocol.RequestBufferJob api
@zcbenz zcbenz merged commit 2c0b50a into electron:master Mar 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants